platform/upstream/gstreamer.git
2 years agovp9parse: Correct the pts for frames inside a super frame.
He Junyan [Tue, 11 Oct 2022 08:17:26 +0000 (16:17 +0800)]
vp9parse: Correct the pts for frames inside a super frame.

When the alignment is "FRAME" and the parse is likely connecting to
a decoder, the current PTS setting for VP9 frames inside a super
frame is not very correct.

For example, the super frame may begin with non-displayed frames and
end with a displayed frame. The current way will assign the PTS to
the first non-displayed frame, which is a decode-only frame and the
PTS will be discarded in the video decoder. While the last displayed
frame has invalid PTS, and so the video decoder needs to guess its
PTS based on the frame rate and previous frame's PTS. This is not a
decent and robust way. And more important, when the previous frames
provide DTS, the video decoder will also guess the PTS based on the
previous frames' DTS and trigger the warning like:

  gstvideodecoder.c:3147:gst_video_decoder_prepare_finish_frame: \
  <vavp9dec0> decreasing timestame

It sets the reordered_output and makes the decoder in free run mode.

We should correct the PTS for a super frame, let the non-displayed
frames have no PTS while set the correct PTS to the displayed one.

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

2 years agoavfvideosrc: Allow specifying crop coordinates during screen capture
Piotr Brzeziński [Fri, 7 Oct 2022 22:29:03 +0000 (00:29 +0200)]
avfvideosrc: Allow specifying crop coordinates during screen capture

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

2 years agortsp-server: Free client if no connection could be created
Linus Svensson [Fri, 19 Aug 2022 14:16:26 +0000 (16:16 +0200)]
rtsp-server: Free client if no connection could be created

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

2 years agomxfdemux: Add support for Canon XF-HEVC
Edward Hervey [Wed, 12 Oct 2022 09:12:50 +0000 (11:12 +0200)]
mxfdemux: Add support for Canon XF-HEVC

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

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

2 years agomxfdemux: Don't leak index table segments on failures
Edward Hervey [Wed, 12 Oct 2022 09:12:14 +0000 (11:12 +0200)]
mxfdemux: Don't leak index table segments on failures

The segment was freed ... but not the contents :)

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

2 years agortsp-server: Add since marker for adjust_error_code
Peter Stensson [Tue, 11 Oct 2022 12:55:48 +0000 (14:55 +0200)]
rtsp-server: Add since marker for adjust_error_code

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

2 years agomeson: Update libsoup.wrap
Xavier Claessens [Tue, 11 Oct 2022 18:53:40 +0000 (14:53 -0400)]
meson: Update libsoup.wrap

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

2 years agovideorate: Do not close segment when getting a same segment twice
Thibault Saunier [Fri, 7 Oct 2022 14:46:29 +0000 (11:46 -0300)]
videorate: Do not close segment when getting a same segment twice

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

2 years agovideorate: Handle closing segment on EOS right after caps event
Thibault Saunier [Wed, 14 Sep 2022 19:39:48 +0000 (16:39 -0300)]
videorate: Handle closing segment on EOS right after caps event

The scenario is what we try in the tests:
- we have a segment with .stop set
- some frame(s) flow
- we get a CAPS event
- we get an EOS (before getting buffers after the CAPS event)

in that case, without that patch, the segment is not properly closed
which is not correct. In this patch we keep track of previous caps until
a new buffer arrives, this way in that situation we set previous caps
again, and close the segment with the previous buffer.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1352
in this specific case

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

2 years agovalidate: Plug some leaks
Thibault Saunier [Wed, 21 Sep 2022 14:44:59 +0000 (11:44 -0300)]
validate: Plug some leaks

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

2 years agooss4: Fix debug category initialization
Edward Hervey [Tue, 11 Oct 2022 13:00:37 +0000 (15:00 +0200)]
oss4: Fix debug category initialization

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

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

2 years agowebrtc: Move GST_WEBRTC_ERROR_TYPE_ERROR at the end of the enum to keep ABI compatibility
Sebastian Dröge [Tue, 11 Oct 2022 10:09:20 +0000 (13:09 +0300)]
webrtc: Move GST_WEBRTC_ERROR_TYPE_ERROR at the end of the enum to keep ABI compatibility

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

2 years agotests/webrtc: Add test for 'add-turn-server' action signal
Sangchul Lee [Thu, 6 Oct 2022 11:37:45 +0000 (20:37 +0900)]
tests/webrtc: Add test for 'add-turn-server' action signal

It just checks return value of the action signal.

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

2 years agosctpenc: Prohibit sending of interleaved message parts
Johan Sternerup [Thu, 10 Dec 2020 15:25:26 +0000 (16:25 +0100)]
sctpenc: Prohibit sending of interleaved message parts

Apparently we cannot start sending messages from another datachannel
before the previous message was completely sent. usrsctplib will
complain about being locked on another stream id and set
errno=EINVAL.

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

2 years agoopengl: Fix usage of eglCreate/DestroyImage
Nicolas Dufresne [Mon, 22 Aug 2022 20:33:23 +0000 (16:33 -0400)]
opengl: Fix usage of eglCreate/DestroyImage

The implementation was inconsistent between create and destroy. EGLImage
creation and destruction is requires for EGL 1.5 and up, while
otherwise the KHR version is only available if EGL_KHR_image_base
feature is set. Not doing these check may lead to getting a function
pointer to a stub, which is notably the case when using apitrace.

Fixes #1389

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

2 years agortsp-server: Add support for adjusting request response on pipeline errors
Peter Stensson [Tue, 21 Jun 2022 07:51:55 +0000 (09:51 +0200)]
rtsp-server: Add support for adjusting request response on pipeline errors

The idea is to give the application the possibility to adjust the error
code when responding to a request. For that purpose the pipeline's bus
messages are emitted to subscribers through a signal handle-message.
The subscribers can then check those messages for errors and adjust
the response error code by overriding the virtual method
adjust_error_code().

Fixes #1294

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

2 years agosplitmuxsrc: don't queue data on unlinked pads
Mathieu Duponchelle [Fri, 7 Oct 2022 23:03:13 +0000 (01:03 +0200)]
splitmuxsrc: don't queue data on unlinked pads

Once a pad has returned NOT_LINKED, the part reader shouldn't let its
corresponding data queue run full and eventually (after 20 seconds)
stall playback.

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

2 years agortpsource: Don't do probation for RTX sources
Sebastian Dröge [Mon, 3 Oct 2022 17:28:47 +0000 (20:28 +0300)]
rtpsource: Don't do probation for RTX sources

Disable probation for RTX sources as packets will arrive very
irregularly and waiting for a second packet usually exceeds the deadline
of the retransmission.

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

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

2 years agortp: examples: client-rtpaux: Provide correct caps by payload type and RTX pt map...
Sebastian Dröge [Mon, 3 Oct 2022 16:58:38 +0000 (19:58 +0300)]
rtp: examples: client-rtpaux: Provide correct caps by payload type and RTX pt map by session

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

2 years agotests/check/rtpsession: extend test_internal_sources_timeout
George Kiagiadakis [Fri, 25 Jan 2019 22:04:50 +0000 (17:04 -0500)]
tests/check/rtpsession: extend test_internal_sources_timeout

to verify that rtx SSRCs do not BYE after timeout

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/360

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

2 years agortpsession: Remember the corresponding media SSRC for RTX sources
Sebastian Dröge [Mon, 3 Oct 2022 16:12:55 +0000 (19:12 +0300)]
rtpsession: Remember the corresponding media SSRC for RTX sources

This allows timing out the RTX source and sending BYE for it when the
actual media source belonging to it is timed out.

This change only applies to sending sources from this session.

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

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

2 years agortpsource: Rename rtp_source_update_caps to rtp_source_update_send_caps
Sebastian Dröge [Mon, 3 Oct 2022 16:20:14 +0000 (19:20 +0300)]
rtpsource: Rename rtp_source_update_caps to rtp_source_update_send_caps

To make it clear that this is only used for sending RTP sources.

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

2 years agortpsession: Rename gst_rtp_session_sink_setcaps to gst_rtp_session_setcaps_recv_rtp
Sebastian Dröge [Mon, 3 Oct 2022 10:48:36 +0000 (13:48 +0300)]
rtpsession: Rename gst_rtp_session_sink_setcaps to gst_rtp_session_setcaps_recv_rtp

to make it clearer that this is for setting receiver caps and to make it
more consistent with gst_rtp_session_setcaps_send_rtp.

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

2 years agodecodebin3: allow to call "dispose" multiple times
Aleksandr Slobodeniuk [Thu, 6 Oct 2022 14:23:56 +0000 (16:23 +0200)]
decodebin3: allow to call "dispose" multiple times

https://docs.gtk.org/gobject/concepts.html#reference-counts-and-cycles

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

2 years agodecklink: reset calculation of gst_decklink_video_src_update_time_mapping on no_signa...
Wojciech Kapsa [Fri, 7 Oct 2022 06:30:05 +0000 (08:30 +0200)]
decklink: reset calculation of gst_decklink_video_src_update_time_mapping on no_signal. When the HDMI cable was disconnected for a long time, the calculation took too much time. SDI cable works fine.

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

2 years agoci: Fix website regen on push
Nirbheek Chauhan [Fri, 7 Oct 2022 09:52:36 +0000 (15:22 +0530)]
ci: Fix website regen on push

Don't make the integrate stage manual, we need it to regen the website

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

2 years agoaggregator: fix input buffering
Guillaume Desmottes [Fri, 7 Oct 2022 12:39:47 +0000 (14:39 +0200)]
aggregator: fix input buffering

We need to be able to buffer at least the aggregator latency +
upstream latency, which is the value used to compute the aggregator
deadline.

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

2 years agoMeson: Fix libxml2 fallback
Xavier Claessens [Fri, 7 Oct 2022 11:56:21 +0000 (07:56 -0400)]
Meson: Fix libxml2 fallback

The variable xml2lib_dep does not exist. The correct name is already in
the wrap file.

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

2 years agortspsrc: Retry SETUP with non-compliant URL resolution on "Bad Request" and "Not...
Sebastian Dröge [Thu, 6 Oct 2022 12:02:22 +0000 (15:02 +0300)]
rtspsrc: Retry SETUP with non-compliant URL resolution on "Bad Request" and "Not found"

Various RTSP servers/cameras assume base and control URL to be simply
appended instead of being resolved according to the relative URL
resolution algorithm as mandated by the RTSP specification.

To work around this, try using such a non-compliant control URL if the
server didn't like the URL used in the first SETUP request.

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

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

2 years agowebrtcbin: Fix pointer dereference before null check
Sangchul Lee [Thu, 22 Sep 2022 13:39:31 +0000 (22:39 +0900)]
webrtcbin: Fix pointer dereference before null check

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

2 years agodecklink: Add new persistent-id property and sort devices by persistent ID
Wojciech Kapsa [Mon, 26 Sep 2022 11:57:15 +0000 (13:57 +0200)]
decklink: Add new persistent-id property and sort devices by persistent ID

The order of the devices iterator from the SDK is undefined and can
randomly change.

Keep the device-number property for backwards compatibility and
simplicity but prefer the persistent-id property and also use it for the
device provider implementation.

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

2 years agodecodebin3: fix mutex leaks
Aleksandr Slobodeniuk [Thu, 6 Oct 2022 11:03:26 +0000 (13:03 +0200)]
decodebin3: fix mutex leaks

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

2 years agotranscodebin: Implement support for upstream stream selection
Thibault Saunier [Tue, 4 Oct 2022 22:19:57 +0000 (19:19 -0300)]
transcodebin: Implement support for upstream stream selection

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

2 years agodecodebin3: Do not try to plug a decoder on raw formats
Thibault Saunier [Mon, 3 Oct 2022 18:20:53 +0000 (15:20 -0300)]
decodebin3: Do not try to plug a decoder on raw formats

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

2 years agovideosink: Don't return unknown end-time from get_times()
Seungha Yang [Wed, 5 Oct 2022 15:00:59 +0000 (00:00 +0900)]
videosink: Don't return unknown end-time from get_times()

... in case of reverse playback. Otherwise basesink will not
wait for clock

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

2 years agoavauddec: address regression with WMA files ..
Mathieu Duponchelle [Tue, 4 Oct 2022 19:27:36 +0000 (21:27 +0200)]
avauddec: address regression with WMA files ..

By outputting lead-in samples that FFmpeg now would like us to ignore,
and discarding trailing samples that it would now like us to output.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1474

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1348
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3117>

2 years agovalidate:launcher: Cleanup test uuid when copying it
Thibault Saunier [Wed, 5 Oct 2022 15:57:02 +0000 (12:57 -0300)]
validate:launcher: Cleanup test uuid when copying it

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

2 years agovalidate: launcher: Add a argument to avoid rereuning flaky tests
Thibault Saunier [Tue, 4 Oct 2022 22:17:15 +0000 (19:17 -0300)]
validate: launcher: Add a argument to avoid rereuning flaky tests

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

2 years agovalidate: launcher: Keep variable framerate from input when possible
Thibault Saunier [Tue, 4 Oct 2022 22:16:44 +0000 (19:16 -0300)]
validate: launcher: Keep variable framerate from input when possible

But disable it if forcing a framerate for some reason

Fixing our support for variable framerate in the encoding profile
serialization format.

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

2 years agovalidate: launcher: Fix some pep8 issues
Thibault Saunier [Tue, 4 Oct 2022 22:16:04 +0000 (19:16 -0300)]
validate: launcher: Fix some pep8 issues

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

2 years agovalidate: Handle testfiles that need an HTTP server
Thibault Saunier [Tue, 4 Oct 2022 22:14:49 +0000 (19:14 -0300)]
validate: Handle testfiles that need an HTTP server

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

2 years agovalidate:ssim: Show original/nok/diff images on error images
Thibault Saunier [Tue, 27 Sep 2022 19:35:31 +0000 (16:35 -0300)]
validate:ssim: Show original/nok/diff images on error images

This way the user can easily see how off the image is very easily

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

2 years agovalidate:scenario: Fix setting iterating variable from arrays
Thibault Saunier [Tue, 27 Sep 2022 15:51:33 +0000 (12:51 -0300)]
validate:scenario: Fix setting iterating variable from arrays

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

2 years agod3d11: Fix debug build on UWP
Nirbheek Chauhan [Wed, 5 Oct 2022 00:08:54 +0000 (05:38 +0530)]
d3d11: Fix debug build on UWP

GstDXGIGetDebugInterface() is unused when targeting UWP. We directly
call DXGIGetDebugInterface1() in that case.

Fixes build failure:

../gst-libs/gst/d3d11/gstd3d11device.cpp(271): error C2440: '=': cannot convert from 'HRESULT (__cdecl *)(UINT,const IID &,void **)' to 'DXGIGetDebugInterface_t'
../gst-libs/gst/d3d11/gstd3d11device.cpp(271): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast

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

2 years agowebrtc/nice: Make sure to return NULL when validating turn server fails
Sangchul Lee [Wed, 5 Oct 2022 06:59:03 +0000 (15:59 +0900)]
webrtc/nice: Make sure to return NULL when validating turn server fails

It affects 'add-turn-server' signal action and 'turn-server' property
of webrtcbin.

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

2 years agowebrtc: return error when sending on non-open datachannel
Johan Sternerup [Mon, 21 Mar 2022 09:29:21 +0000 (10:29 +0100)]
webrtc: return error when sending on non-open datachannel

According to W3C
specification (https://w3c.github.io/webrtc-pc/#datachannel-send) we
should return InvalidStateError exception when trying to send when the
channel is not open. In the world of C/glib/gstreamer we don't have
exceptions but have to rely on gboolean/GError instead. Introducing
these calls for a change in function signature of the action signals
used to send data on the datachannel. Changing the signature of the
existing "send-string" and "send-data" signals would mean an immediate
breaking change so instead we deprecate them. Furthermore, there is no
way to express GError** as an argument to an action signal in a way
that fits language bindings (pointer-to-pointer simply does not work)
and we have to use regular functions instead.

Therefore we introduce gst_webrtc_data_channel_send_data_full() and
gst_webrtc_data_channel_send_string_full() while deprecating the old
functions and corresponding signals.

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

2 years agoeglimage: fix Y412_LE DMABuf import support
Haihao Xiang [Fri, 2 Jul 2021 08:22:04 +0000 (16:22 +0800)]
eglimage: fix Y412_LE DMABuf import support

This fixed the error below:

GST_GL_PLATFORM=egl gst-launch-1.0 videotestsrc ! msdkvpp !
"video/x-raw(memory:DMABuf),format=Y412_LE" ! glimagesink

0:00:00.063737691 576978 0x557c11266920 ERROR             gleglimage
gsteglimage.c:577:_drm_rgba_fourcc_from_info: Unsupported format for
DMABuf.

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

2 years agoeglimage: add Y410 DMABuf import support
Haihao Xiang [Fri, 2 Jul 2021 08:01:19 +0000 (16:01 +0800)]
eglimage: add Y410 DMABuf import support

This fixed the error below:

GST_GL_PLATFORM=egl gst-launch-1.0 videotestsrc ! msdkvpp ! \
"video/x-raw(memory:DMABuf),format=Y410" ! glimagesink

0:00:00.040553883 576732 0x55be9b35f920 ERROR             gleglimage
gsteglimage.c:577:_drm_rgba_fourcc_from_info: Unsupported format for
DMABuf.

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

2 years agoeglimage: add Y212_LE / Y212_BE DMABuf import support
Haihao Xiang [Fri, 2 Jul 2021 12:31:22 +0000 (20:31 +0800)]
eglimage: add Y212_LE / Y212_BE DMABuf import support

This fixed the error below:

GST_GL_PLATFORM=egl gst-launch-1.0 videotestsrc ! msdkvpp \
! "video/x-raw(memory:DMABuf),format=Y212_LE" ! glimagesink

0:00:00.148086281 575148 0x562a6d36d920 ERROR             gleglimage
gsteglimage.c:555:_drm_rgba_fourcc_from_info: Unsupported format for
DMABuf.

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

2 years agoeglimage: add Y210 DMABuf import support
Haihao Xiang [Fri, 2 Jul 2021 07:37:19 +0000 (15:37 +0800)]
eglimage: add Y210 DMABuf import support

This fixed the error below:

GST_GL_PLATFORM=egl gst-launch-1.0 videotestsrc ! msdkvpp ! \
"video/x-raw(memory:DMABuf),format=Y210" ! glimagesink

0:00:00.039881627 571365 0x56245eba6920 ERROR             gleglimage
gsteglimage.c:549:_drm_rgba_fourcc_from_info: Unsupported format for
DMABuf

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

2 years agogstbin: Use g_queue_clear_full()
Jan Schmidt [Fri, 30 Sep 2022 18:58:04 +0000 (04:58 +1000)]
gstbin: Use g_queue_clear_full()

Use g_queue_clear_full() to release the child list
instead of iterating over the list twice.

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

2 years agogstbin: Fix a potential leak in gst_bin_do_deep_add_remove()
Jan Schmidt [Fri, 30 Sep 2022 18:55:49 +0000 (04:55 +1000)]
gstbin: Fix a potential leak in gst_bin_do_deep_add_remove()

If a child element of a bin is unparented while
gst_bin_do_deep_add_remove() is iterating the children,
don't leak a ref to it.

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

2 years agogstiterator: Don't use gst_object_unref() for a GObject
Jan Schmidt [Fri, 30 Sep 2022 18:54:20 +0000 (04:54 +1000)]
gstiterator: Don't use gst_object_unref() for a GObject

The owner of a GstIterator is a plain GObject. Don't unref it
with gst_object_unref(), or it will be logged in tracer
info incorrectly.

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

2 years agoh265parse: fix typo in member of GstH265SPS
Stéphane Cerveau [Fri, 23 Sep 2022 15:18:35 +0000 (17:18 +0200)]
h265parse: fix typo in member of GstH265SPS

Rename sps_extnsion_params to sps_extension_params

Fix comment about vui_parameters_present_flag

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

2 years agoBack to development
Tim-Philipp Müller [Tue, 4 Oct 2022 02:57:31 +0000 (03:57 +0100)]
Back to development

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

2 years agoRelease 1.21.1
Tim-Philipp Müller [Tue, 4 Oct 2022 00:14:01 +0000 (01:14 +0100)]
Release 1.21.1

2 years agoUpdate ChangeLogs for 1.21.1
Tim-Philipp Müller [Tue, 4 Oct 2022 00:13:59 +0000 (01:13 +0100)]
Update ChangeLogs for 1.21.1

2 years agoplaysink: Hold a reference to the soft volume element
Jan Schmidt [Fri, 30 Sep 2022 16:33:49 +0000 (02:33 +1000)]
playsink: Hold a reference to the soft volume element

Always hold a reference to the soft volume element
provided by the playsinkaudioconvert bin helper, the
same as when volume is provided by a sink element,
or the soft volume element gets unreffed too soon.

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

2 years agoxvimagesink: Don't leak XvShmImage
Jan Schmidt [Fri, 30 Sep 2022 18:51:21 +0000 (04:51 +1000)]
xvimagesink: Don't leak XvShmImage

If allocating an XvShmImage generates an X error, but
still returns some allocated memory, make sure to free it
so it doesn't leak.

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

2 years agoxvimagesink: Zero initialize mask array
Jan Schmidt [Fri, 30 Sep 2022 18:49:16 +0000 (04:49 +1000)]
xvimagesink: Zero initialize mask array

Clear the stack array before setting bits to pass to
XISelectEvents(). Fixes spurious crash from an X error:

X Error of failed request:  BadValue (integer parameter out of range for operation)

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

2 years agoxvimagesink: Don't leak temporary
Jan Schmidt [Fri, 30 Sep 2022 18:47:31 +0000 (04:47 +1000)]
xvimagesink: Don't leak temporary

Use a stack variable instead of a temporarily
malloced variable that wasn't being freed
properly. Fixes a small leak of a GstXvTouchDevice

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

2 years agodecodebin3: Make sure event is writable before modifying
Jan Schmidt [Fri, 30 Sep 2022 18:41:06 +0000 (04:41 +1000)]
decodebin3: Make sure event is writable before modifying

Make sure we're operating on a private copy of an event when
modifying it.

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

2 years agourisourcebin: Make sure event is writable before modifying.
Jan Schmidt [Fri, 30 Sep 2022 18:40:09 +0000 (04:40 +1000)]
urisourcebin: Make sure event is writable before modifying.

Make sure we're operating on a private copy of an event before
modifying it.

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

2 years agodecodebin3: Don't lose a ref on EOS event
Jan Schmidt [Fri, 30 Sep 2022 18:37:05 +0000 (04:37 +1000)]
decodebin3: Don't lose a ref on EOS event

Make sure not to give away the ref on the final EOS
event for which the probe handler is returning GST_PAD_PROBE_REMOVE
when pushing the event manually.

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

2 years agoqueue2: Hold the lock when modifying sinkresult
Edward Hervey [Mon, 3 Oct 2022 09:16:25 +0000 (11:16 +0200)]
queue2: Hold the lock when modifying sinkresult

As it's done elsewhere. Avoids a potential race of the field being modified in
the meantime.

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

2 years agoqtdemux: Don't stop task when resetting
Edward Hervey [Wed, 27 Jul 2022 09:19:50 +0000 (11:19 +0200)]
qtdemux: Don't stop task when resetting

This is a regression that was introduced in
cca2f555d14b5751f7f9d466b66127544dad5138 (yes, 9 years ago).

The only place where a demuxer streaming thread should be stopped is when the
sinkpad is deactivated from pull mode (i.e. PAUSED->READY).

Attempting to stop the task in this function would cause this to happen when a
FLUSH_STOP or STREAM_START event is received... which can cause deadlocks.

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

2 years agoavauddec: fix unnecessary reconfiguration if the audio layout isn't specified
Tim-Philipp Müller [Thu, 29 Sep 2022 11:42:21 +0000 (12:42 +0100)]
avauddec: fix unnecessary reconfiguration if the audio layout isn't specified

It would constantly want to renegotiate (and spam the debug log) even
though the channel layout hasn't actually changed. We use the same
fallback in gst_ffmpegauddec_negotiate() already.

This happens with WMA files for example.

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

2 years agosplitmuxsrc: don't consider unlinked pads when deactivating part
Mathieu Duponchelle [Fri, 30 Sep 2022 16:57:01 +0000 (18:57 +0200)]
splitmuxsrc: don't consider unlinked pads when deactivating part

If splitmuxsrc exposes multiple pads, but only one is linked, part pads
will never see an EOS event. This shouldn't prevent the part from being
eventually deactivated.

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

2 years agopbutils: descriptions: add meta/x-klv
Tim-Philipp Müller [Thu, 29 Sep 2022 23:10:25 +0000 (00:10 +0100)]
pbutils: descriptions: add meta/x-klv

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

2 years agopbutils: descriptions: fix gst_pb_utils_get_caps_description_flags()
Tim-Philipp Müller [Thu, 29 Sep 2022 23:07:07 +0000 (00:07 +0100)]
pbutils: descriptions: fix gst_pb_utils_get_caps_description_flags()

And add a little unit test.

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

2 years agoxmptag: Call gst_tag_register_musicbrainz_tags during init
James Cowgill [Thu, 29 Sep 2022 08:39:15 +0000 (09:39 +0100)]
xmptag: Call gst_tag_register_musicbrainz_tags during init

We need to call this to register the MusixBrainz tags before we use
them in an XMP schema.

Fixes this critical when attempting to run jpegparse on a JPEG
containing MusicBrainz XMP tags:

  GStreamer-CRITICAL **: 20:41:07.885: gst_tag_get_type: assertion 'info != NULL' failed

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

2 years agotest-effect-switch: Fix some memory leaks and make effect element ownership clearer
Sebastian Dröge [Thu, 29 Sep 2022 11:36:38 +0000 (14:36 +0300)]
test-effect-switch: Fix some memory leaks and make effect element ownership clearer

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

2 years agogaussblur: Fix memory leak when setting caps multiple times
Sebastian Dröge [Thu, 29 Sep 2022 11:34:31 +0000 (14:34 +0300)]
gaussblur: Fix memory leak when setting caps multiple times

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

2 years agov4l2codecs: Warn user when no media devices are found
Christopher Obbard [Tue, 27 Sep 2022 17:17:24 +0000 (18:17 +0100)]
v4l2codecs: Warn user when no media devices are found

Currently if the user is not able to access the devices under /dev/media*,
either due to no media devices present on the system or simply no permission
to access the device, v4l2codecs initialises with no features or debug messages.

Since calling `GST_DEBUG="v4l2*:7" gst-inspect-1.0 v4l2codecs` is a typical way
to diagnose why element(s) failed to enumerate, we should be more verbose here
when the user is not able to access any /dev/media* device. So print a simple
debug message in this case to aid debugging.

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

2 years agobuffer: drop parent meta in deep copy/foreach_metadata
Philipp Zabel [Wed, 28 Mar 2018 15:54:15 +0000 (17:54 +0200)]
buffer: drop parent meta in deep copy/foreach_metadata

The purpose of a deep buffer copy is to be able to release the source
buffer and all its dependencies. Attaching the parent buffer meta to
the newly created deep copy needlessly keeps holding a reference to the
parent buffer.

The issue this solves is the fact you need to allocate more
buffers, as you have free buffers being held for no reason. In the good
cases it will use more memory, in the bad case it will stall your
pipeline (since codecs often need a minimum number of buffers to
actually work).

Fixes #283

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

2 years agotsdemux: Don't trigger a program change when falling back to ignore-pcr behaviour
Mart Raudsepp [Tue, 20 Sep 2022 20:31:45 +0000 (23:31 +0300)]
tsdemux: Don't trigger a program change when falling back to ignore-pcr behaviour

Since commit a79a756b79aa1675e we could change to ignore-pcr automatically at 500ms
into a live stream when no PCR is seen by then. However the stream counting in
program change detection was wrongly considering ignore-pcr programs to have a
separate PCR PID, even though we are actually ignoring the PCR PID completely,
resulting in an erroneous program switch getting triggered from the different
stream count. This in turn would send an EOS and switch out the pads for what
actually is still the same program, while we intended to simply apply a
workaround for broken encoders.

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

2 years agogst-docs: update macOS new project instructions
Aleix Conchillo Flaqué [Fri, 23 Sep 2022 21:46:33 +0000 (14:46 -0700)]
gst-docs: update macOS new project instructions

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

2 years agomeson: Do not modify default value of -Dtools for subprojects
Nirbheek Chauhan [Tue, 12 Apr 2022 19:03:03 +0000 (00:33 +0530)]
meson: Do not modify default value of -Dtools for subprojects

See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1136
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2166>

2 years agomeson: Remove some dead code
Nirbheek Chauhan [Tue, 12 Apr 2022 19:03:26 +0000 (00:33 +0530)]
meson: Remove some dead code

We no longer create any symlinks.

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

2 years agoexamples: Support multiple video streams in JS webrtc sendrecv
Nirbheek Chauhan [Mon, 26 Sep 2022 11:23:43 +0000 (16:53 +0530)]
examples: Support multiple video streams in JS webrtc sendrecv

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

2 years agortspsrc: Fix usage of IPv6 connections in SETUP
Nirbheek Chauhan [Tue, 1 Mar 2022 11:00:10 +0000 (16:30 +0530)]
rtspsrc: Fix usage of IPv6 connections in SETUP

If the SETUP request returns an IPv6 server address in the Transport
field, we would generate an incorrect URI, and multiudpsink would fail
to initialize:

```
     rtspsrc gstrtspsrc.c:9780:dump_key_value:<source>    key: 'Transport', value: 'RTP/AVP;unicast;source=fe80::dc27:25ff:fe5e:bd13:8080;client_port=62696-62697;server_port=4000-4001'
...
     rtspsrc gstrtspsrc.c:4595:gst_rtspsrc_stream_configure_udp_sinks:<source> configure RTP UDP sink for fe80::dc27:25ff:fe5e:bd13:8080:4000
...
multiudpsink gstmultiudpsink.c:1229:gst_multiudpsink_configure_client:<udpsink0> error: Invalid address family (got 23)
```

We can't look at stream->is_ipv6 because we can't rely on the server
returning the right value there. In the issue reported about this,
server reported itself as `KuP RTSP Server/0.1`, and the SDP was:

```
c=IN IP4
m=video 54608 RTP/AVP 96
a=rtpmap:96 H264/90000
```

So we need to parse the string value and figure out the family
ourselves.

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

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

2 years agomeson: Remove builtin variable datadir from pkgconfig variables
Nirbheek Chauhan [Tue, 27 Sep 2022 14:16:28 +0000 (19:46 +0530)]
meson: Remove builtin variable datadir from pkgconfig variables

Fixes warning with meson 0.62:

gst-plugins-bad| subprojects/gst-plugins-bad/meson.build:546: WARNING:
Project targets '>= 0.62' but uses feature deprecated since '0.62.0':
pkgconfig.generate variable for builtin directories. They will be
automatically included when referenced

and more.

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

2 years agodecodebin3: Fix memory issues with active selection list
Edward Hervey [Tue, 27 Sep 2022 11:41:37 +0000 (13:41 +0200)]
decodebin3: Fix memory issues with active selection list

This had a couple of issues:
* The backing strings (from GstStream) could disappear
* The actual list wasn't properly reset/freed when decodebin3 was re-used

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

2 years agoqtdemux: guard against timestamp calculation overflow in gap event loop
Tim-Philipp Müller [Tue, 27 Sep 2022 12:56:54 +0000 (13:56 +0100)]
qtdemux: guard against timestamp calculation overflow in gap event loop

Could possibly cause an endless loop.

Fixes #1400.

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

2 years agodashdemux2: fix mpd unit test expectations
Jan Schmidt [Mon, 26 Sep 2022 14:08:41 +0000 (00:08 +1000)]
dashdemux2: fix mpd unit test expectations

Update unit test for some mpd cases that were reporting
timestamps including the period start time, while
dashdemux2 expects that it needs to add the period
start time itself.

Fix the tests to not expect the period start time
to be included.

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

2 years agodashdemux2: Set timestamp relative to period start
Junsoo Park [Tue, 23 Aug 2022 14:12:44 +0000 (23:12 +0900)]
dashdemux2: Set timestamp relative to period start

These values will be referred to as timestamp relative to period start
so need to subtract period start time from the values.

Fixes a problem with determining the start position when playing Live content
with SegmentTimeline, presentationTimeOffset and a non-0 period start time.

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

2 years agogsturi: When setting the same string again do nothing
Sebastian Dröge [Mon, 26 Sep 2022 11:17:18 +0000 (14:17 +0300)]
gsturi: When setting the same string again do nothing

Otherwise code like gst_uri_set_host(uri, gst_uri_get_host(uri)) would
first free the string, then create a copy of the freed string and then
assigned that.

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

2 years agoUpdate all wraps from WrapDB
Xavier Claessens [Sun, 18 Sep 2022 19:27:19 +0000 (15:27 -0400)]
Update all wraps from WrapDB

Update all wraps available in WrapDB. This is simply running the
command "meson wrap update --force" with that Meson PR:
https://github.com/mesonbuild/meson/pull/10357.

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

2 years agovp9: check if libvpx supports high bit depth
Jakub Adam [Thu, 22 Sep 2022 17:02:10 +0000 (19:02 +0200)]
vp9: check if libvpx supports high bit depth

Detect at runtime if libvpx is compiled with --enable-vp9-highbitdepth
and enable 10bit video formats in element caps accordingly.

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

2 years agomeson: Add a new option to control the source for orc
Nirbheek Chauhan [Wed, 21 Sep 2022 16:18:31 +0000 (21:48 +0530)]
meson: Add a new option to control the source for orc

Previously we were unconditionally cloning the orc subproject because
we want the developer environment to use the latest orc. However, some
people want to use the system orc instead, or want to auto-detect
which to use, with the system orc getting preference. This requires
adding a new option to select that. See discussion at:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2556

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

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

2 years agoci: Move non-image-tag variables back to .gitlab-ci.yml
Nirbheek Chauhan [Thu, 22 Sep 2022 19:38:49 +0000 (01:08 +0530)]
ci: Move non-image-tag variables back to .gitlab-ci.yml

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3065#note_1563706

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

2 years agoci: Bump cerbero trigger timeout to 4h
Nirbheek Chauhan [Thu, 22 Sep 2022 12:33:53 +0000 (18:03 +0530)]
ci: Bump cerbero trigger timeout to 4h

macOS runners can get overworked and cause cerbero pipelines to take
longer than 3h to complete, because each cross-macos-universal job
takes about 2h and so it can take that long to get a runner allocated.

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

2 years agoci: Use include syntax for files on the same gitlab instance
Nirbheek Chauhan [Thu, 22 Sep 2022 12:31:10 +0000 (18:01 +0530)]
ci: Use include syntax for files on the same gitlab instance

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

2 years agoci: Move image tags into a separate template yml
Nirbheek Chauhan [Thu, 22 Sep 2022 12:22:42 +0000 (17:52 +0530)]
ci: Move image tags into a separate template yml

This will allow gst-plugins-rs documentation CI to include this
template via a remote include and doesn't need to manually update the
image. This causes cascading failures across all repos, for example
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/874
is required for making gst-plugins-rs CI pass in Cerbero, which is
also run on the gstreamer monorepo.

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

2 years agobasetransform: Avoid useless codepath
Edward Hervey [Thu, 15 Sep 2022 14:22:23 +0000 (16:22 +0200)]
basetransform: Avoid useless codepath

If QoS is disabled, skip the whole computation (avoids calculating values which
won't be needed)

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

2 years agobad/soundtouch: Fix interactive test build on MSVC
Nirbheek Chauhan [Thu, 22 Sep 2022 03:44:57 +0000 (09:14 +0530)]
bad/soundtouch: Fix interactive test build on MSVC

Needed for https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/930

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

2 years agoci: Remove unused FEDORA_DOCS_IMAGE variable
Nirbheek Chauhan [Thu, 22 Sep 2022 04:27:22 +0000 (09:57 +0530)]
ci: Remove unused FEDORA_DOCS_IMAGE variable

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

2 years agoci: Bump meson to 0.62.2 in Fedora docker images
Nirbheek Chauhan [Thu, 22 Sep 2022 04:25:45 +0000 (09:55 +0530)]
ci: Bump meson to 0.62.2 in Fedora docker images

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

2 years agomeson: Use implicit builtin dirs in pkgconfig generation
Nirbheek Chauhan [Wed, 21 Sep 2022 13:49:45 +0000 (19:19 +0530)]
meson: Use implicit builtin dirs in pkgconfig generation

Starting with Meson 0.62, meson automatically populates the variables
list in the pkgconfig file if you reference builtin directories in the
pkgconfig file (whether via a custom pkgconfig variable or elsewhere).
We need this, because ${prefix}/libexec is a hard-coded value which is
incorrect on, for example, Debian.

Bump requirement to 0.62, and remove version compares that retained
support for older Meson versions.

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

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

2 years agoadaptivedemux2: Always wake up loop thread on unpause
Seungha Yang [Tue, 20 Sep 2022 15:26:38 +0000 (00:26 +0900)]
adaptivedemux2: Always wake up loop thread on unpause

Otherwise loop thread will sleep forever because
GstAdaptiveDemuxLoop.paused flag update is not signalled
when loop was marked as stopped already from other thread.

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