platform/upstream/gstreamer.git
2 years agov4l2: Add protection when set decoder capture fps accroding to output fps
Hou Qi [Mon, 9 Aug 2021 02:46:30 +0000 (10:46 +0800)]
v4l2: Add protection when set decoder capture fps accroding to output fps

Some v4l2 drivers don't have the capacity to change framerate. There is
chance to make decoder capture fps to be 0/0 if numerator and denominator
returned by G_PARM ioctl are both 0. It causes critical warning
"passed '0' as denominator for `GstFraction'".

In order to fix this, add protection when set decoder capture fps according
to output fps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1048>

2 years agortspsrc: Add support to ignore x-server HEADER reply
Per Förlin [Tue, 1 Jun 2021 13:33:01 +0000 (15:33 +0200)]
rtspsrc: Add support to ignore x-server HEADER reply

When connecting to an RTSP server in tunnled mode (HTTP) the server
usually replies with a x-server header. This contains the address
of the intended streaming server. However some servers return an
"invalid" address. Here follows two examples when it might happen.

1. A server use Apache combined with a separate RTSP process to handle
   Https request on port 443. In this case Apache handle TLS and
   connects to the local RTSP server, which results in a local
   address 127.0.0.1 or ::1 in the x-server reply. This address is
   returned to the actual RTSP client in the x-server header.
   The client will receive this address and try to  connect to it
   and fail.

2. The client use a ipv6 link local address with a specified scope id
   fe80::aaaa:bbbb:cccc:dddd%eth0 and connects via Http on port 80.
   The RTSP server receives the connection and returns the address
   in the x-server header. The client will receive this address and
   try to connect to it "as is" without the scope id and fail.

In the case of streaming data from RTSP servers like 1. and 2. it's
useful to have the option to simply ignore the x-server header reply
and continue using the original address.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1007>

2 years agogstqmlgl: fix indent
Dmitry Shusharin [Wed, 4 Aug 2021 05:33:06 +0000 (12:33 +0700)]
gstqmlgl: fix indent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>

2 years agogstqmlgl: wrap raw GstGLContext into GWeakRef
Dmitry Shusharin [Fri, 30 Jul 2021 09:52:23 +0000 (16:52 +0700)]
gstqmlgl: wrap raw GstGLContext into GWeakRef

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>

2 years agogstqmlgl: add multisink test application
Dmitry Shusharin [Fri, 30 Jul 2021 09:32:13 +0000 (16:32 +0700)]
gstqmlgl: add multisink test application

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>

2 years agogstqmlgl: refactoring: rename ambiguous variables, clean up unused and duplicated...
Dmitry Shusharin [Fri, 30 Jul 2021 10:21:46 +0000 (17:21 +0700)]
gstqmlgl: refactoring: rename ambiguous variables, clean up unused and duplicated ones

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>

2 years agogstqmlgl: rework WGL-specific context init code
Dmitry Shusharin [Fri, 30 Jul 2021 10:20:59 +0000 (17:20 +0700)]
gstqmlgl: rework WGL-specific context init code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>

2 years agogstqmlgl: retrieve correct device bound to current GL context (+ minor code cleanup)
Dmitry Shusharin [Fri, 30 Jul 2021 10:20:49 +0000 (17:20 +0700)]
gstqmlgl: retrieve correct device bound to current GL context (+ minor code cleanup)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>

2 years agogstqmlgl: correct validation for Qt GL context
Dmitry Shusharin [Fri, 30 Jul 2021 10:20:25 +0000 (17:20 +0700)]
gstqmlgl: correct validation for Qt GL context

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>

2 years agogstqmlgl: create helper QRunnable-based class for render jobs
Dmitry Shusharin [Fri, 30 Jul 2021 10:20:07 +0000 (17:20 +0700)]
gstqmlgl: create helper QRunnable-based class for render jobs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1032>

2 years agortpjitterbuffer: fixed stall on gap when using rtx
Tulio Beloqui [Fri, 6 Aug 2021 14:25:02 +0000 (16:25 +0200)]
rtpjitterbuffer: fixed stall on gap when using rtx

Co-authored-by: Håvard Graff <havard@pexip.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1055>

2 years agoflv: use g_memdup2() as g_memdup() is deprecated
Nirbheek Chauhan [Fri, 13 Aug 2021 14:02:53 +0000 (19:32 +0530)]
flv: use g_memdup2() as g_memdup() is deprecated

g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1052>

2 years agosouphttpsrc: Always use the content decoder but set `Accept-Encoding: identity` if...
Sebastian Dröge [Sun, 15 Aug 2021 09:26:38 +0000 (12:26 +0300)]
souphttpsrc: Always use the content decoder but set `Accept-Encoding: identity` if no compression should be used

Some servers respond with gzip-encoded responses regardless of whether
the request allowed it to be used in the response. By always having the
content decoder enabled, these invalid responses can be decoded
correctly while for well-behaving servers the `compress` property
selects between allowing compressed responses or not.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/833

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1053>

2 years agoqt: always update the sink_retrieved flag when the sink retrieves
Matthew Waters [Thu, 12 Aug 2021 12:57:01 +0000 (22:57 +1000)]
qt: always update the sink_retrieved flag when the sink retrieves

Fixes a case where adding a qmlgloverlay element after an existing
qmlglsink elements was already in the pipeline would create an entirely
separate GstGLDisplay pointing to the same underlying display resource.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1050>

2 years agovideocrop: Resurrect logging category.
Víctor Manuel Jáquez Leal [Wed, 11 Aug 2021 12:52:52 +0000 (14:52 +0200)]
videocrop: Resurrect logging category.

Fix for a regression from commit 8f1384c9. That commit moved the debug
category definition, as static, into a gstvideocropelement.c, but that
category was used as default, in gstvideocrop.c, so it was never used
at logging, so the debug selector never showed the logs for
videocrop.

This patch move back the category definition into gstvideocrop.c and
leaving the function videocrop_element_init() as a noop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1049>

2 years agojpeg: Add support for meson fallback
Seungha Yang [Sat, 31 Jul 2021 14:14:34 +0000 (23:14 +0900)]
jpeg: Add support for meson fallback

Allow building jpeg plugin by using meson fallback

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1041>

2 years agov4l2: Keep decoder capture fps same as output fps if it's not set
Hou Qi [Tue, 27 Jul 2021 02:43:21 +0000 (10:43 +0800)]
v4l2: Keep decoder capture fps same as output fps if it's not set

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1035>

2 years agojack: Add port-names property to select ports explicitly
Seungha Yang [Tue, 27 Jul 2021 09:33:18 +0000 (18:33 +0900)]
jack: Add port-names property to select ports explicitly

By this new property, user can select physical port to connect,
and element will pick requested port instead of random ones.
User should provide full port name including "client_name:" prefix.
An example is
jackaudiosrc port-names="system:capture_1,system:capture_3" ! ...
   jackaudiosink port-names="system:playback_2"

In addition to "port-names" property, a new connect type "explicit"
is added so that element can post error message if requested
"port-names" contains invalid port(s).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1037>

2 years agoqt: Support RGB format
Kai Uwe Broulik [Fri, 23 Jul 2021 09:04:00 +0000 (11:04 +0200)]
qt: Support RGB format

In GstQSGTexture::hasAlphaChannel return value based on
whether the video format has alpha channel.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1040>

2 years agojack: Add low-latency property for automatic latency-optimized setting
Seungha Yang [Mon, 26 Jul 2021 11:14:32 +0000 (20:14 +0900)]
jack: Add low-latency property for automatic latency-optimized setting

Similar to wasapi/wasapi2 plugins on Windows, adding low-latency
option so that jack element can optimize GstAudioRingBufferSpec
setting for low latency.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1034>

2 years agojack: Remove trailing whitespace
Seungha Yang [Mon, 26 Jul 2021 10:55:25 +0000 (19:55 +0900)]
jack: Remove trailing whitespace

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1034>

2 years agovideocrop: Resurrect any caps feature negotiation.
Víctor Manuel Jáquez Leal [Tue, 27 Jul 2021 15:58:15 +0000 (17:58 +0200)]
videocrop: Resurrect any caps feature negotiation.

Commit e31cbce4 brought a regression to negotiate featured caps. But
only by removing the entry in the caps template. This commit brings it
back.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1039>

2 years agojack: Fix assertion fail when device supports only mono channel
Seungha Yang [Mon, 26 Jul 2021 09:43:04 +0000 (18:43 +0900)]
jack: Fix assertion fail when device supports only mono channel

MAX should be larger than MIN for GST_TYPE_INT_RANGE.

GStreamer-CRITICAL **: 18:26:27.912:
gst_value_collect_int_range: assertion 'collect_values[0].v_int < collect_values[1].v_int' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1033>

2 years agoqmlglsrc: fix operation without any qmlglsink
Matthew Waters [Wed, 21 Jul 2021 10:14:46 +0000 (20:14 +1000)]
qmlglsrc: fix operation without any qmlglsink

E.g. a pipeline like qmlglsrc ! gldownload ! ... would currently fail to
run because the OpenGL context are not created in the correct order.

The QtWindow also needs to know the OpenGL context used by downstream
elements in order to set optimize for the correct GstGLSyncMeta for
synchonisation purposes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1036>

2 years agosplitmuxsink: Fix some reference leaks in error cases.
Jan Schmidt [Mon, 26 Jul 2021 07:55:24 +0000 (17:55 +1000)]
splitmuxsink: Fix some reference leaks in error cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1023>

2 years agosplitmuxsink: Prevent hang going back to NULL after failures
Jan Schmidt [Wed, 7 Jul 2021 14:12:52 +0000 (00:12 +1000)]
splitmuxsink: Prevent hang going back to NULL after failures

Prevent a condition where splitmuxsink won't go back to NULL state
after a child element fails to change state by making sure that
a READY->READY state change doesn't fail, and by returning
GST_FLOW_ERROR or GST_FLOW_FLUSHING upstream to shut down streaming
as quickly as possible.

This can happen after (for example) setting an invalid filename
on the sink element. In that case, the READY->PAUSED transition
fails, but with internal elements still in the NULL state. Trying
to set splitmuxsink back to NULL then ends up trying to bring
those NULL elements up to READY with a READY->READY transition,
(which fails, prevent splitmuxsink from getting to NULL)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1023>

2 years agodeinterlace: reduce noise when gst_pad_set_caps fails
Mathieu Duponchelle [Mon, 12 Jul 2021 23:27:45 +0000 (01:27 +0200)]
deinterlace: reduce noise when gst_pad_set_caps fails

It may be that downstream is simply flushing, in which case logging
an error is misleading.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1029>

2 years agosplitmuxsink: always use factory property when set
Mathieu Duponchelle [Thu, 8 Jul 2021 00:22:20 +0000 (02:22 +0200)]
splitmuxsink: always use factory property when set

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1024>

2 years agoqtdemux: No need for new "application/x-cbcs" caps
Yacine Bandou [Mon, 21 Jun 2021 11:47:50 +0000 (13:47 +0200)]
qtdemux: No need for new "application/x-cbcs" caps

Instead of using the new "application/x-cbcs" caps, we are just adding
a new structure field "ciphe-mode", to indicate which encryption scheme
is used: "cenc", "cbcs", "cbc1" or "cens".

Similarly for the protection metadata, we add the "cipher-mode" field
to specify the encryption mode with which the buffers are encrypted.

"cenc": AES-CTR (no pattern)
"cbc1": AES-CBC (no pattern)
"cens": AES-CTR (pattern specified)
"cbcs": AES-CBC (pattern specified, using a constant IV)

Currently only "cenc" and "cbcs" are supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1013>

2 years agoqt: Fix clang build
Philippe Normand [Mon, 5 Jul 2021 15:12:57 +0000 (16:12 +0100)]
qt: Fix clang build

The updatePaintNode method is part of the QQuickItem class interface, so needs
to be flagged as overriding the default implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/567>

2 years agoqt: Add navigation events support
Philippe Normand [Wed, 15 Apr 2020 09:38:04 +0000 (10:38 +0100)]
qt: Add navigation events support

Currently handles only mouse events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/567>

2 years agogtk: Scroll events dispatch support
Philippe Normand [Wed, 15 Apr 2020 09:33:22 +0000 (10:33 +0100)]
gtk: Scroll events dispatch support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/567>

2 years agomatroskamux: Always write a tags element into seekhead
Jan Schmidt [Thu, 1 Jul 2021 15:41:05 +0000 (01:41 +1000)]
matroskamux: Always write a tags element into seekhead

If there are only stream tags, we still want to write the
tags entry into the seekhead, so that tags can be found
quickly in the player.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/905

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1020>

2 years agoqtmux: Don't need to update track per GstCaps if it's not changed
Seungha Yang [Wed, 30 Jun 2021 14:52:26 +0000 (23:52 +0900)]
qtmux: Don't need to update track per GstCaps if it's not changed

Skip GstQTMuxPad::set_caps() call for duplicated caps.
All the processing done in set_caps() method for duplicated caps
are redundant.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1019>

2 years agortpssrcdemux: Remove pads and reset the element also in READY->NULL
Sebastian Dröge [Thu, 1 Jul 2021 10:18:45 +0000 (13:18 +0300)]
rtpssrcdemux: Remove pads and reset the element also in READY->NULL

Mostly for completeness.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1018>

2 years agortpptdemux: Remove pads also in PAUSED->READY
Sebastian Dröge [Thu, 1 Jul 2021 10:18:09 +0000 (13:18 +0300)]
rtpptdemux: Remove pads also in PAUSED->READY

They're based on per-stream information and that should be reset
whenever going to READY state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1018>

2 years agodocs: update plugins cache for vp9enc
Jakub Adam [Tue, 16 Feb 2021 15:39:34 +0000 (16:39 +0100)]
docs: update plugins cache for vp9enc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/874>

2 years agovpx: add enum for adaptive quantization modes
Jakub Adam [Fri, 9 Apr 2021 17:22:29 +0000 (19:22 +0200)]
vpx: add enum for adaptive quantization modes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/874>

2 years agovp9enc: expose frame-parallel-decoding property
Jakub Adam [Tue, 16 Feb 2021 12:28:00 +0000 (13:28 +0100)]
vp9enc: expose frame-parallel-decoding property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/874>

2 years agovp9enc: expose aq-mode property
Jakub Adam [Tue, 16 Feb 2021 11:57:55 +0000 (12:57 +0100)]
vp9enc: expose aq-mode property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/874>

2 years agomultiudpsink: Fix broken SO_SNDBUF get/set on Windows
Seungha Yang [Sat, 26 Jun 2021 11:00:03 +0000 (20:00 +0900)]
multiudpsink: Fix broken SO_SNDBUF get/set on Windows

SO_SNDBUF has been undefined on Windows because of missing WinSock2.h
include. And don't use native socket functions (e.g., setsockopt())
if code is expected to be built on Windows. We don't link ws2_32.lib
for this plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1016>

2 years agortpmanager: Access GstRTPHdrExt fields through accessor
Olivier Crête [Thu, 24 Jun 2021 18:57:14 +0000 (14:57 -0400)]
rtpmanager: Access GstRTPHdrExt fields through accessor

This way, the implementation can be private.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1017>

2 years agoqtdemux: Refuse seeks in BYTES format
Jan Schmidt [Tue, 22 Jun 2021 07:19:19 +0000 (17:19 +1000)]
qtdemux: Refuse seeks in BYTES format

If downstream tries to seek in BYTES format, don't pass that through
to upstream. The byte positions downstream requests won't make any
sense in the muxed stream. There might be other formats we want to
pass through to upstream, but BYTES is not one of them. If we get a
seeking query about BYTES format, refuse that too.

This fixes a situation where we're playing a fragmented mp4 over http
and qtdemux refuses the initial seek (in TIME format), but then
h264parse/baseparse send a seek in BYTES format and everything falls
apart.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1014>

2 years agortph265depay: update codec_data in caps regardless of format
Nirbheek Chauhan [Wed, 16 Jun 2021 11:00:59 +0000 (16:30 +0530)]
rtph265depay: update codec_data in caps regardless of format

Updating of codec_data in the caps is important to propagate changes
in sps/pps/vps via NALs. Without this, downstream does not renegotiate
when upstream changes resolution.

The comment referring to rtph264pay is from 2015 and is out of date.
rtph264pay stopped doing that in 2017 with commit
dabeed52a995d27e16eba9e4617e61eb0bcd44c4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1011>

3 years agodoc: update gst_plugins_cache.json
Jordan Petridis [Fri, 4 Jun 2021 10:56:05 +0000 (13:56 +0300)]
doc: update gst_plugins_cache.json

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1006>

3 years agoqtitem: don't potentially leak a large number of buffers
Matthew Waters [Thu, 3 Jun 2021 10:33:45 +0000 (20:33 +1000)]
qtitem: don't potentially leak a large number of buffers

The only other place where these queued buffers are removed, is in
setCaps() but that is not called at all on shutdown so this list of
buffers could not be removed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1004>

3 years agojpegenc: Remove arbitrary encoding size limitation
Nicolas Dufresne [Fri, 28 May 2021 13:54:12 +0000 (09:54 -0400)]
jpegenc: Remove arbitrary encoding size limitation

The encoder is happy to encode with sizes less then 16x16, so remove this
arbitrary limitation. This also fixes the fact the sink and src template caps
disagree.

Fixes #888

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/998>

3 years agoqtdemux: use g_memdup2() as g_memdup() is deprecated
Tim-Philipp Müller [Sun, 23 May 2021 14:42:38 +0000 (15:42 +0100)]
qtdemux: use g_memdup2() as g_memdup() is deprecated

- atom nodes/bytereader sizes are already checked
- palettes: are fixed/known size

g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/993>

3 years agomatroskademux: use g_memdup2() as g_memdup() is deprecated
Tim-Philipp Müller [Sun, 23 May 2021 00:28:11 +0000 (01:28 +0100)]
matroskademux: use g_memdup2() as g_memdup() is deprecated

- ebml-read: add some sanity checks when going from 64-bit
  to 32-bit length
- matroska-ids: codec_data_size has been checked via
  gst_ebml_read_binary(), is existing allocation.
- matroska-demux: alloc size is from existing allocations

g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/993>

3 years agoUse g_memdup2() where available and add fallback for older GLib versions
Tim-Philipp Müller [Sat, 22 May 2021 18:39:32 +0000 (19:39 +0100)]
Use g_memdup2() where available and add fallback for older GLib versions

- png: alloc size variable is a png type that's always 32-bit
- vpx: alloc size based on existing allocation
- wavpack: alloc size based on existing allocation
- icles: gdkpixbufoverlay: trusted and hard-coded input data
- rtp tests: rtp-payloading, vp8, vp9, h264, h265: trusted and/or static input data

g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/993>

3 years agoBack to development
Tim-Philipp Müller [Tue, 1 Jun 2021 14:28:36 +0000 (15:28 +0100)]
Back to development

3 years agoRelease 1.19.1
Tim-Philipp Müller [Mon, 31 May 2021 23:11:44 +0000 (00:11 +0100)]
Release 1.19.1

3 years agortpjpegpay: fix image corruption when compiled with MSVC on Windows
Tim-Philipp Müller [Sat, 29 May 2021 11:54:22 +0000 (12:54 +0100)]
rtpjpegpay: fix image corruption when compiled with MSVC on Windows

On Windows with MSVC, jpeg_header_size would end up 2 bytes larger
than it should be. This then leads to the first 2 bytes of the
actual jpeg image data to be dropped, because we think those
belong to the header, which results in an undecodable image when
reconstructed in the depayloader.

What happens is that when the compiler evaluates

  jpeg_header_size = mem.offset + read_u16_and_inc_offset_by_2(&mem);

it actually uses the mem.offset value after it has been increased
by the function call on the right hand size of the equation.

From section 6.5 of the C99 spec:

  3. The grouping of operators and operands is indicated by the syntax [74].
     Except as specified later (for the function-call (), &&, ||, ?:, and
     comma operators), the order of evaluation of subexpressions and the
     order in which side effects take place are both unspecified.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/889

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/999>

3 years agov4l2videoenc: Set default latency if the frame duration is invalid
Hou Qi [Tue, 25 May 2021 08:19:20 +0000 (16:19 +0800)]
v4l2videoenc: Set default latency if the frame duration is invalid

If the duration of the v4l2object is invalid, use default 25fps instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/996>

3 years agodeinterlace: Drop "field-order" field while transforming caps
Seungha Yang [Tue, 25 May 2021 15:23:56 +0000 (00:23 +0900)]
deinterlace: Drop "field-order" field while transforming caps

Like other basetransform subclasses are doing, drop field
which can be converted by deinterlace.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/997>

3 years agodeinterlace: Drop field-order field if outputting progressive
Seungha Yang [Tue, 25 May 2021 11:10:34 +0000 (20:10 +0900)]
deinterlace: Drop field-order field if outputting progressive

Progressive with field-order doesn't make sense

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/997>

3 years agortpssrcdemux: fix "data flow before segment event" crash
Havard Graff [Fri, 21 May 2021 12:19:29 +0000 (14:19 +0200)]
rtpssrcdemux: fix "data flow before segment event" crash

This crash could happen at any time a RTP and RTCP buffer arrived
simultaneously in ssrcdemux.

The problem was that sticky-event arriving while the rtp and rtcp pads
were being set up could arrive just too late to be included in the initial
forwarding.

The fix checks if the stickies have been sent on the srcpad about to be
pushed on, and if not sends them. It also blocks any stickes from
being forwarded *prior* to this happening, to avoid them arriving on
the srcpad multiple times.

Since the test loops 1000 times, this will make running under valgrind
take forever, so use the RUNNING_ON_VALGRIND variable to detect we
are running under valgrind, and reduce the loop-count to 2 in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/992>

3 years agortpssrcdemux: refactor destruction of GstRtpSsrcDemuxPads
Havard Graff [Fri, 21 May 2021 16:45:17 +0000 (18:45 +0200)]
rtpssrcdemux: refactor destruction of GstRtpSsrcDemuxPads

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/992>

3 years agortpssrcdemux: make naming consistent
Havard Graff [Fri, 21 May 2021 16:30:28 +0000 (18:30 +0200)]
rtpssrcdemux: make naming consistent

Use plural for GstRtpSsrcDemuxPads, since it contains two pads, and
use the variable-name 'dpads' everywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/992>

3 years agowavparse: use g_strndup() for copying text data
Tim-Philipp Müller [Sun, 23 May 2021 14:14:11 +0000 (15:14 +0100)]
wavparse: use g_strndup() for copying text data

So we don't rely on NUL terminators inside the data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>

3 years agowavparse: clean up adtl/note/labl chunk parsing
Tim-Philipp Müller [Sun, 23 May 2021 12:29:07 +0000 (13:29 +0100)]
wavparse: clean up adtl/note/labl chunk parsing

We were passing the size of the adtl chunk to the note/labl
sub-chunk parsing function, which means we may memdup lots of
data after the chunk string's NUL terminator that doesn't
really belong to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>

3 years agowavparse: guard against overflow when comparing chunk sizes
Tim-Philipp Müller [Sun, 23 May 2021 12:24:21 +0000 (13:24 +0100)]
wavparse: guard against overflow when comparing chunk sizes

Could be rewritten as lsize > (size - 8) a well, but the
extra check seems clearer. Doesn't look like it was problematic,
lsize wasn't actually used when parsing the sub-chunks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>

3 years agodoc: update gst_plugins_cache.json
Daniel Almeida [Fri, 21 May 2021 16:31:12 +0000 (13:31 -0300)]
doc: update gst_plugins_cache.json

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/991>

3 years agomatroskademux: fix decoder glitches with H264 content
Stéphane Cerveau [Wed, 5 May 2021 11:20:04 +0000 (13:20 +0200)]
matroskademux: fix decoder glitches with H264 content

To avoid decoder starvation causing glitches on screen,
the demuxer shall clip only when the buffer is a key frame
and the lace time is greater than the stop time.

Fixes gst-editing-services#128

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/973>

3 years agoqml: don't use buffers that have invalid contents
Matthew Waters [Tue, 11 May 2021 10:41:38 +0000 (20:41 +1000)]
qml: don't use buffers that have invalid contents

If the GL context is not shareable, ignore it.

A future change may also not output the relevant output either.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/983>

3 years agoqml: also use the dummy texture when no buffer has been set
Matthew Waters [Tue, 11 May 2021 10:38:52 +0000 (20:38 +1000)]
qml: also use the dummy texture when no buffer has been set

Fixes corrupted texture output when changing OpenGL display/contexts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/983>

3 years agodoc: Update cache for RGBP format addition
Nicolas Dufresne [Tue, 11 May 2021 21:20:00 +0000 (17:20 -0400)]
doc: Update cache for RGBP format addition

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>

3 years agomatroskademux: Advertise codec-alpha in caps
Nicolas Dufresne [Fri, 23 Apr 2021 18:37:46 +0000 (14:37 -0400)]
matroskademux: Advertise codec-alpha in caps

This will be used to select the appropriate decoders. We also only attach the
GstVideoCodecAlphaMeta if the AlphaMode element is set, this is to stay on the
safe side and mimic what browsers (verified in Firefox and Chromium code) do.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>

3 years agomatroskademux: Store alpha stream in VideoCodecAlphaMeta
Nicolas Dufresne [Mon, 22 Mar 2021 20:58:26 +0000 (16:58 -0400)]
matroskademux: Store alpha stream in VideoCodecAlphaMeta

This generalize the feature over using mini object quark data. If
that feature was Matroska specifc, using the new CustomMeta would have
been enough and arguably cleaner then QData, though it seems that
similar technique is use with AV1 Image Format (AVIF).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>

3 years agomatroska-demux: extract VP8 alpha from BlockAdditionals
Tim-Philipp Müller [Sat, 3 Dec 2016 14:27:57 +0000 (14:27 +0000)]
matroska-demux: extract VP8 alpha from BlockAdditionals

And put it on buffers as qdata (which is easier in this
case than a private custom meta because it can be picked
up easily in other modules).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>

3 years agoqt: return a different GstGLDisplay object when the first sink requests
Matthew Waters [Mon, 3 May 2021 07:39:05 +0000 (17:39 +1000)]
qt: return a different GstGLDisplay object when the first sink requests

This allows the 'replace-gstreamer-opengl-context' context machinery to
correctly replace the OpenGL context used by the pipeline when the first
qmlglsink is added to the pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/982>

3 years agoudpsrc: Plug leaks of saddr in error cases
Jan Alexander Steffens (heftig) [Fri, 7 May 2021 09:16:47 +0000 (11:16 +0200)]
udpsrc: Plug leaks of saddr in error cases

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/977>

3 years agoudpsrc: Whitespace
Jan Alexander Steffens (heftig) [Fri, 7 May 2021 09:16:21 +0000 (11:16 +0200)]
udpsrc: Whitespace

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/977>

3 years agodeinterlace: Plug a method subobject leak
Jan Alexander Steffens (heftig) [Thu, 6 May 2021 22:43:44 +0000 (00:43 +0200)]
deinterlace: Plug a method subobject leak

Changing the method would leak the previous method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/976>

3 years agovp9enc: Add color range support
Nicolas Dufresne [Thu, 6 May 2021 19:04:42 +0000 (15:04 -0400)]
vp9enc: Add color range support

When setting the colorspace, we now clear the range to reduced range,
the default, and then we also set the range so the VP9 encoder encodes
the right information in the bitstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/975>

3 years agovp9enc: Move colorspace configuration in VP9 enc
Nicolas Dufresne [Thu, 6 May 2021 18:51:31 +0000 (14:51 -0400)]
vp9enc: Move colorspace configuration in VP9 enc

This is not supported by VP8 and was causing a warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/975>

3 years agovpxdenc: Add a GstVideoCodecState to configure_encoder virtual
Nicolas Dufresne [Thu, 6 May 2021 18:48:36 +0000 (14:48 -0400)]
vpxdenc: Add a GstVideoCodecState to configure_encoder virtual

This will be needed to configure the VP9 specific colorimetry, which is
currently configured for VP8 casing warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/975>

3 years agogtk: Remove coordinates double-translation
Bastien Nocera [Wed, 5 May 2021 14:48:10 +0000 (16:48 +0200)]
gtk: Remove coordinates double-translation

Remove our own translation in the mouse event capture code, as that
translation will be done through the navigation interface.

Tested by resizing the window created by:
gst-launch-1.0 -v videotestsrc ! navigationtest ! glupload ! glcolorconvert ! tee name=t  ! gtkglsink
and checking that the cursor follows the mouse as expected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/974>

3 years agogtk: Translate navigation events coordinates
Bastien Nocera [Wed, 5 May 2021 12:28:15 +0000 (14:28 +0200)]
gtk: Translate navigation events coordinates

If the application passed down some pointer coordinates, translate those
from display coordinates to stream coordinates, so things work as
expected even if the video is resized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/974>

3 years agogtk: Export _display_size_to_stream_size()
Bastien Nocera [Wed, 5 May 2021 12:24:31 +0000 (14:24 +0200)]
gtk: Export _display_size_to_stream_size()

Export _display_size_to_stream_size() so that GstNavigation implementors
can translate from display coordinates to stream coordinates before
pushing the events upstream to the DVD source, for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/974>

3 years agomatroska-mux: Change accepted caps width and height from [16, MAX] to [1, MAX]
David Fernandez [Mon, 26 Feb 2018 16:26:41 +0000 (17:26 +0100)]
matroska-mux: Change accepted caps width and height from [16, MAX] to [1, MAX]

There are cases where the video size might be less than 16x16.
This change allows the Matroska muxer to accept this cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/539>

3 years agoUse gst_element_request_pad_simple
François Laignel [Tue, 20 Apr 2021 20:08:23 +0000 (22:08 +0200)]
Use gst_element_request_pad_simple

Instead of the deprecated gst_element_get_request_pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/958>

3 years agoqtmux: Make sure to write 64-bit STCO table when needed.
Jan Schmidt [Thu, 29 Apr 2021 22:12:47 +0000 (08:12 +1000)]
qtmux: Make sure to write 64-bit STCO table when needed.

qtmux attempts to choose between writing a 32-bit stco chunk offset table
when it can, but switch to a 64-bit co64 table when file offsets go over
4GB.

This patch fixes a problem where the atom handling code was checking
mdat-relative offsets instead of the final file offset (computed by
adding the mdat position plus the mdat-relative offset) - leading to
problems where files with a size between 4GB and 4GB+offset-of-the-mdat
would write incorrect STCO tables with some samples having truncated
32-bit offsets.

Smaller files write STCO correctly, larger files would switch to
co64 and also output correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/970>

3 years agov4l2object: Add interlace-mode back to caps for camera
Hou Qi [Thu, 22 Apr 2021 07:01:32 +0000 (15:01 +0800)]
v4l2object: Add interlace-mode back to caps for camera

skip_try_fmt_probes is set to TRUE for v4l2src to skip interlace-mode and
colorimetry when probe caps. gst_v4l2_object_set_format_full() will add
colorimetry back to caps when iterating over the negotiated caps. There is
one case that v4l2src is first in preview state then starts recording.
v4l2src caps will change with an additional interlace-mode structure after
renegotiation, then v4l2src needs to reset. But this camera driver can't
orphan buffer pool, it causes require buffer failed as streaming is still
in active state.

To fix this, also need to add interlace-mode back to caps for camera to
avoid reset.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/961>

3 years agortpopuspay: set MARKER flag
Guillaume Desmottes [Fri, 2 Apr 2021 16:41:28 +0000 (18:41 +0200)]
rtpopuspay: set MARKER flag

Set MARKER flag on first buffer after DTX.

According to RFC 3551 section 4.1 the marker bit needs to be set on
"the first packet after a silence period during which packets have
not been transmitted contiguously".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/967>

3 years agortpopuspay: add DTX support
Guillaume Desmottes [Wed, 31 Mar 2021 09:18:30 +0000 (11:18 +0200)]
rtpopuspay: add DTX support

If enabled, the payloader won't transmit empty frames.

Can be tested using:
  opusenc dtx=true bitrate-type=vbr ! rtpopuspay dtx=true

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/967>

3 years agotaglib: Update createFrame() to non-deprecated version.
Doug Nazar [Sat, 24 Apr 2021 15:15:50 +0000 (11:15 -0400)]
taglib: Update createFrame() to non-deprecated version.

ID3v2::FrameFactory::createFrame() versions not taking a Header have
been deprecated since v1.5 (Jan 2008).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/965>

3 years agortpjitterbuffer: fix divide-by-zero
Havard Graff [Sun, 25 Apr 2021 00:16:45 +0000 (02:16 +0200)]
rtpjitterbuffer: fix divide-by-zero

The estimated packet-duration can sometimes end up as zero, and dividing
by that is never a good idea...

The test reproduces the scenario, and the fix is easy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/966>

3 years agortpjitterbuffer: clean up and improve missing packets handling
Havard Graff [Tue, 2 Jun 2020 17:38:33 +0000 (19:38 +0200)]
rtpjitterbuffer: clean up and improve missing packets handling

* Try to make variable and function names more clear.
* Add plenty of comments describing the logic step-by-step.
* Improve the logging around this, making the logs easier to read and
  understand when debugging these issues.

* Revise the logic of packets that are actually beyond saving in doing
  the following:
1. Do an optimistic estimation of which packets can still arrive.
2. Based on this, find which packets (and duration) are now hopelessly
   lost.
3. Issue an immediate lost-event for the hopelessly lost and then add
   lost/rtx timers for the ones we still hope to save, meaning that if
   they are to arrive, they will not be discarded.

* Revise the use of rtx-delay:
  Earlier the rtx-delay would vary, depending on the pts of the latest
  packet and the estimated pts of the packet it being issued a RTX for,
  but now that we aim to estimate the PTS of the missing packet accurately,
  the RTX delay should remain the same for all packets.
  Meaning: If the packet have a PTS of X, the delay in asked for a RTX
  for this packet is always a constant X + delay, not a variable one.

* Finally ensure that the chaotic "check-for-stall" tests uses timestamps
  that starts from 0 to make them easier to debug.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/952>

3 years agolevel: make properties thread-safe
Guillaume Desmottes [Fri, 23 Apr 2021 10:07:52 +0000 (12:07 +0200)]
level: make properties thread-safe

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/962>

3 years agolevel: disable passthrough when audio-level-meta is enabled
Guillaume Desmottes [Thu, 22 Apr 2021 12:11:09 +0000 (14:11 +0200)]
level: disable passthrough when audio-level-meta is enabled

Ensure we receive a writable buffer to add the meta.

Fix #878

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/962>

3 years agomatroskamux: Don't pass a non-GObject pointer to GST_DEBUG_OBJECT and similar
Sebastian Dröge [Fri, 23 Apr 2021 05:28:06 +0000 (08:28 +0300)]
matroskamux: Don't pass a non-GObject pointer to GST_DEBUG_OBJECT and similar

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/964>

3 years agortpjitterbuffer: Avoid generation of invalid timestamps
Edward Hervey [Thu, 22 Apr 2021 06:57:23 +0000 (08:57 +0200)]
rtpjitterbuffer: Avoid generation of invalid timestamps

When updating timestamps and timer timeouts with a new offset, make sure that
the resulting value is valid (and not a negative (signed) value which ends up in
a massive (unsigned) value).

Fixes #571

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/960>

3 years agov4l2: Fix glib warning emitted when attribute query fails
Philippe Normand [Wed, 21 Apr 2021 17:41:08 +0000 (18:41 +0100)]
v4l2: Fix glib warning emitted when attribute query fails

The v4l2object is not a GstObject. Logging has to go through its dbg_obj
specially meant for this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/959>

3 years agoqmloverlay: Use first found GstGLVideoItem as widget property
VaL Doroshchuk [Thu, 25 Mar 2021 12:20:38 +0000 (13:20 +0100)]
qmloverlay: Use first found GstGLVideoItem as widget property

GstGLVideoItem is required to render input video in the overlay's qml.
And currently qmlgloverlay requires to set this GstGLVideoItem to its widget property.

Instead of fetching GstGLVideoItem from the overlay's root object (root-item prop),
and setting it back as a widget (widget prop),
proposing to use found GstGLVideoItem in the current object hierarchy (passed in qml-scene) by default.

Also useful in Python, which solves the issue when casting gpointer <=> QQuickItem* is required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/919>

3 years agov4l2: fix debug category initialisation again
Tim-Philipp Müller [Mon, 19 Apr 2021 15:39:03 +0000 (16:39 +0100)]
v4l2: fix debug category initialisation again

Would spew warnings on the rpi4 when calling into
gst_v4l2_object_get_codec_caps() from the probe_and_register()
function since the v4l2_debug category initialisation would
only be done later as part of the element/device provider
registration.

Also log things in the probe function to the v4l2 category
instead of the default category while we're at it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/956>

3 years agortspsrc: Fix race saving seek event seqnum.
Doug Nazar [Mon, 19 Apr 2021 05:29:33 +0000 (01:29 -0400)]
rtspsrc: Fix race saving seek event seqnum.

We need to save the seek seqnum before the flush stop event
since that will start the basesrc task which may send the segment
event before we're ready.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/954>

3 years agoqmlglsink: allow to set force-aspect-ratio property
Marco Felsch [Wed, 31 Mar 2021 08:52:14 +0000 (10:52 +0200)]
qmlglsink: allow to set force-aspect-ratio property

Add the forceAspectRatio Q_PROPERTY to allow changing the aspect ratio
from QML code as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/937>

3 years agov4l2src: fix spurious SOURCE_CHANGED error-level log messages
Tim-Philipp Müller [Mon, 19 Apr 2021 10:14:00 +0000 (11:14 +0100)]
v4l2src: fix spurious SOURCE_CHANGED error-level log messages

They're harmless, and some drivers at least return EINVAL
instead of ENOTTY for unsupported events (here: uvcvideo).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/955>

3 years agortpsbcpay: remove use of packed struct for payload
Doug Nazar [Wed, 14 Apr 2021 20:32:06 +0000 (16:32 -0400)]
rtpsbcpay: remove use of packed struct for payload

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/950>