platform/upstream/gstreamer.git
2 years agofilesink: fix handling of non-existing paths with musl
Tim-Philipp Müller [Mon, 2 May 2022 10:41:52 +0000 (11:41 +0100)]
filesink: fix handling of non-existing paths with musl

Fixes #1194

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

2 years agotsdemux: Demote warning to simple debug
Edward Hervey [Mon, 2 May 2022 07:15:57 +0000 (09:15 +0200)]
tsdemux: Demote warning to simple debug

That issue is actually handled, so don't pollute the logs with such warning.

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

2 years agoregistry: skip Rust dep builddirs when searching for plugins recursively
Tim-Philipp Müller [Sat, 9 Apr 2022 20:07:43 +0000 (21:07 +0100)]
registry: skip Rust dep builddirs when searching for plugins recursively

These artefacts confuse the plugin scanner and may cause noisy warnings
(and slow down things).

Fixes https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/68

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

2 years agointerlace: Also handle a missing "interlace-mode" field as progressive
Sebastian Dröge [Fri, 29 Apr 2022 16:08:46 +0000 (19:08 +0300)]
interlace: Also handle a missing "interlace-mode" field as progressive

Otherwise caps negotiation will fail in situations that are supposed
to work, like:

  "video/x-raw,framerate=(fraction)60/1" ! interlace field-pattern=0 ! "video/x-raw,framerate=(fraction)30/1"

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

2 years agointerlace: Add some more debug output to the getcaps function
Sebastian Dröge [Fri, 29 Apr 2022 16:08:32 +0000 (19:08 +0300)]
interlace: Add some more debug output to the getcaps function

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

2 years agocuda: Fix GstCudaContext refcount bug
Myles Inglis [Fri, 29 Apr 2022 15:56:54 +0000 (16:56 +0100)]
cuda: Fix GstCudaContext refcount bug

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

2 years agowebrtc: Fix memory leak in icestream
Ludvig Rappe [Thu, 28 Apr 2022 15:08:11 +0000 (17:08 +0200)]
webrtc: Fix memory leak in icestream

Since both g_value_set_object() and g_weak_ref_get() takes a reference
there will be two new references to the GstWebRTCICE object when there
should be only one. g_value_take_object() has the same functionality as
g_value_set_object() but does not take a reference.

Without this change, the GstWebRTCICE object will be leaked.

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

2 years agocuda: Correct CUDA device id field in GstContext structure
Seungha Yang [Wed, 27 Apr 2022 13:50:37 +0000 (22:50 +0900)]
cuda: Correct CUDA device id field in GstContext structure

device id is unsigned int, not signed.

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

2 years agortpjitterbuffer: Free CNAME/SSRC mappings on finalize and PAUSED->READY
Sebastian Dröge [Fri, 29 Apr 2022 20:33:47 +0000 (23:33 +0300)]
rtpjitterbuffer: Free CNAME/SSRC mappings on finalize and PAUSED->READY

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

2 years agortpmanager: Refactor RTCP packet loops to fix control flow
Sebastian Dröge [Fri, 29 Apr 2022 20:13:15 +0000 (23:13 +0300)]
rtpmanager: Refactor RTCP packet loops to fix control flow

Mixing C loops with switch statements is a bad idea as break has a
different meaning in both. Breaking inside the switch statements wrongly
caused further loop iterations.

Instead use goto to get out of the loop and continue to do another loop
iteration, and never ever use break except for the end of a case.

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

2 years agortpjitterbuffer: Initialize variables
Seungha Yang [Wed, 27 Apr 2022 15:58:30 +0000 (00:58 +0900)]
rtpjitterbuffer: Initialize variables

Avoid use of uninitialized variable
Fixing MSVC warning
gstrtpjitterbuffer.c(4733) : warning C4700: uninitialized local variable 'have_sdes' used

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

2 years agocodecs: h265decoder: Fix documentation.
Víctor Manuel Jáquez Leal [Thu, 28 Apr 2022 11:23:39 +0000 (13:23 +0200)]
codecs: h265decoder: Fix documentation.

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

2 years agomssdemux2: Don't expose/use streams we can't handle yet
Edward Hervey [Thu, 28 Apr 2022 08:49:55 +0000 (10:49 +0200)]
mssdemux2: Don't expose/use streams we can't handle yet

Avoids issues further down

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

2 years agomssdemux2: Ensure stream/track uniqueness
Edward Hervey [Thu, 28 Apr 2022 08:46:34 +0000 (10:46 +0200)]
mssdemux2: Ensure stream/track uniqueness

If there is more than one track of the same type (say audio), we would end up
creating several stream/types with the same name.

Instead use the MSS stream name property to make them unique

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

2 years agompegts: Handle "empty" PMT gracefully
Edward Hervey [Wed, 27 Apr 2022 13:24:50 +0000 (15:24 +0200)]
mpegts: Handle "empty" PMT gracefully

Some streams have 2 PMT sections in a single TS packet. The first one is "valid"
but doesn't contain/define any streams. That causes an unrecoverable issue when
we try to activate the 2nd (valid) PMT.

Instead of doing that, pre-emptively refuse to process PMT without any streams
present within. We still do post that section on the bus to inform applications.

Fixes #1181

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

2 years agopythonplugin: fails silently on plugin issue
Stéphane Cerveau [Thu, 21 Apr 2022 07:51:50 +0000 (09:51 +0200)]
pythonplugin: fails silently on plugin issue

If a gst python plugin fails to load, the meta plugin
should continue to try loading the following.
If no plugin can be loaded, the meta plugin should
not be blacklisted by returning false.

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

2 years agosrtp: fix flaky unit test
Stéphane Cerveau [Tue, 26 Apr 2022 07:11:07 +0000 (09:11 +0200)]
srtp: fix flaky unit test

Use different port for each test to avoid other UDP
packet to be received.

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

2 years agovideodecoder: release stream lock after handling gap events
Philippe Normand [Wed, 27 Apr 2022 09:18:39 +0000 (10:18 +0100)]
videodecoder: release stream lock after handling gap events

The stream lock is taken before handling gap events but was not released in all
possible runtime situations. This issue was introduced in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1274

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

2 years agosubparse: don't deref a potentially NULL variable
Matthew Waters [Thu, 28 Apr 2022 05:32:27 +0000 (15:32 +1000)]
subparse: don't deref a potentially NULL variable

If the html SAMI data is malformed, then retrieving the attribute name
may fail.  We then cannot retrieve the attribute value.

Fixes: https://oss-fuzz.com/testcase-detail/4700130671984640
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2317>

2 years agod3d11h265dec: Assign PRIMARY + 1 rank
Seungha Yang [Wed, 27 Apr 2022 15:48:35 +0000 (00:48 +0900)]
d3d11h265dec: Assign PRIMARY + 1 rank

Promote d3d11h265dec to be default one if available

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

2 years agonvvp9sldec: Increase DPB size to cover render delay
Seungha Yang [Wed, 27 Apr 2022 15:31:49 +0000 (00:31 +0900)]
nvvp9sldec: Increase DPB size to cover render delay

This should've included in the previous MR
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/987
already, but missed.

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

2 years agoparsebin: Expose streams of unknown type
Edward Hervey [Wed, 27 Apr 2022 07:22:40 +0000 (09:22 +0200)]
parsebin: Expose streams of unknown type

This actually respects the existing `expose-all-streams` property by exposing
them and having them present in the stream collection (as streams of type
unknown).

Fixes #1179

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

2 years agoqroverlay: Reset data_changed after we use the info
Thibault Saunier [Mon, 7 Mar 2022 15:44:04 +0000 (15:44 +0000)]
qroverlay: Reset data_changed after we use the info

It was never reset so it was always TRUE once the data was changed!

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

2 years agoqroverlay: Add a GstQROverlay meta
Thibault Saunier [Fri, 4 Mar 2022 22:00:18 +0000 (22:00 +0000)]
qroverlay: Add a GstQROverlay meta

See documentation

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

2 years agowavparse: Unset DISCONT buffer flag for divided into multiple buffers in push mode
dongil.park [Wed, 27 Apr 2022 03:24:23 +0000 (12:24 +0900)]
wavparse: Unset DISCONT buffer flag for divided into multiple buffers in push mode

In push mode (streaming), if the received chunk buffer size from _chain is bigger
than output buffer size, the flags of the divided-buffers are propagated to the
DISCONT flag from first received chunk buffer. This unexpected buffers contained DISCONT
flags are abnormally transformed when changing the sampling rate by audioresample element.
So unset unnecessary DISCONT flag before pad_push().

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

2 years agoplaybin2: Remove dead code
Edward Hervey [Wed, 27 Apr 2022 06:23:59 +0000 (08:23 +0200)]
playbin2: Remove dead code

blacklisted_mimes has been empty for ages. Remove the code "using" it.

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

2 years agotimeoverlay: add support for reference timestamp time mode
Mathieu Duponchelle [Thu, 21 Apr 2022 00:04:57 +0000 (02:04 +0200)]
timeoverlay: add support for reference timestamp time mode

+ update date-time mode to actually use the timestamp that
  was selected with the time-mode property

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2252>

2 years agortpjitterbuffer: add the reference timestamp meta in more situations
Sebastian Dröge [Tue, 26 Apr 2022 19:17:51 +0000 (22:17 +0300)]
rtpjitterbuffer: add the reference timestamp meta in more situations

Previously, we only added it when actually performing synchronization
based on the NTP time.

The information can be useful downstream in other situations too, and
we can compute a NTP time as soon as we get a sender report with the
relevant information.

Co-authored-by: Mathieu Duponchelle <mathieu@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2252>

2 years agortpgstpay: Don't push packets before the first input buffer is received
Sebastian Dröge [Wed, 20 Apr 2022 14:35:29 +0000 (17:35 +0300)]
rtpgstpay: Don't push packets before the first input buffer is received

It's not possible to create a valid RTP timestamp for them, which would
cause a potentially very big RTP timestamp discontinuity between those
first packets (created from initial events) and the packet based on the
first input buffer.

As a side-effect, also simplify the packet aggregation code a bit and
work with only a single level of buffer lists.

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

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

2 years agortpbasepayload: always store input buffer meta before negotiation
Mathieu Duponchelle [Wed, 27 Apr 2022 00:08:00 +0000 (02:08 +0200)]
rtpbasepayload: always store input buffer meta before negotiation

The decision to store the input buffer depends on whether extensions
are to be added to the output buffer, I assume as an optimization.

This creates an issue for subclasses that call negotiate(), where
header_exts is actually populated, from their handle_buffer()
implementation: at chain time, no header extension has been negotiated
yet, which means that we don't add extensions to the first batch of
buffers that comes out.

Keep track of whether negotiate has been called (this is different
from the negotiated field) and always store the input buffer until
then. This fixes the issue while largely preserving the optimization.

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

2 years agotests/onvif: improve robustness
Mathieu Duponchelle [Tue, 26 Apr 2022 23:13:11 +0000 (01:13 +0200)]
tests/onvif: improve robustness

The previous iteration of the code was inferring the type of the
frame by looking at the overall size of the gst-payloaded packet.

It is more robust to actually parse the payload and look at the
actual data buffers it contains.

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

2 years agotests/onvif: don't push buffers outside segment
Mathieu Duponchelle [Tue, 26 Apr 2022 23:10:46 +0000 (01:10 +0200)]
tests/onvif: don't push buffers outside segment

segment->stop is exclusive, so in reverse playback mode we do not
need to output a buffer at that position as it will simply get
clipped in basesink.

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

2 years agortponviftimestamp: add extension data to all packets ..
Mathieu Duponchelle [Tue, 26 Apr 2022 22:27:06 +0000 (00:27 +0200)]
rtponviftimestamp: add extension data to all packets ..

regardless of whether they are input as individual buffers or
buffer lists.

The ONVIF specification requires all packets to hold the extension,
it makes no sense to behave differently when handling buffer lists.

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

2 years agocudaconvert: Enhance debugging when setting video info fails
Thibault Saunier [Tue, 8 Mar 2022 21:26:16 +0000 (21:26 +0000)]
cudaconvert: Enhance debugging when setting video info fails

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

2 years agocodecparsers: bitwriter: Calculate PicSizeInCtbsY when writing slice header.
He Junyan [Tue, 26 Apr 2022 14:35:30 +0000 (22:35 +0800)]
codecparsers: bitwriter: Calculate PicSizeInCtbsY when writing slice header.

 The slice->pps->PicWidthInCtbsY/PicHeightInCtbsY values are calculated when
 we parse the slice header. But they are not calculated in bitwriter and so
 may not have valid value when writing slice header.

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

2 years agocodecparsers: bitwriter: Fix some coverity issues of H265 bitwriter.
He Junyan [Sun, 24 Apr 2022 09:26:03 +0000 (17:26 +0800)]
codecparsers: bitwriter: Fix some coverity issues of H265 bitwriter.

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

2 years agovideoscale: Fix the src video info error in transfer_colorimetry_from_input()
He Junyan [Sun, 24 Apr 2022 15:19:00 +0000 (23:19 +0800)]
videoscale: Fix the src video info error in transfer_colorimetry_from_input()

Pipeline such as:
gst-launch-1.0 -vf videotestsrc ! video/x-raw,format=NV12,colorimetry=\(string\)bt709 \
 ! videoscale ! video/x-raw,format=I420 ! fakesink
Always trigger a error:
ERROR             video-info video-info.c:556:gst_video_info_from_caps: no width property given

Because it is called before the fixate_size(), the src caps' resolution
may be absent or not fixed. That causes that the src video info can not
be created correctly and we can not inherit the colorimetry and chroma-site
from the input caps.

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

2 years agovideorate: fix assertion when pushing last and only buffer without duration
Guillaume Desmottes [Tue, 26 Apr 2022 08:58:08 +0000 (10:58 +0200)]
videorate: fix assertion when pushing last and only buffer without duration

Fixing this pipeline:
  gst-launch-1.0 filesrc location=sample.png ! pngdec ! videorate ! fakesink

- videorate receives a single buffer with pts = 0, duration = invalid;
- then it receives eos triggering this buffer to be pushed downstream;
- the pushing code was assuming that a duration was set, which is
  impossible as we received a single buffer and no output framerate was
  set either. So the best we can do is to push the buffer without
  duration.

Fix #1177

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

2 years agova: dec: Use gst_buffer_pool_config_set_va_alignment() to set alignment.
He Junyan [Sat, 23 Apr 2022 16:02:18 +0000 (00:02 +0800)]
va: dec: Use gst_buffer_pool_config_set_va_alignment() to set alignment.

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

2 years agova: pool: Replace all tabs with spaces in header file.
He Junyan [Sat, 23 Apr 2022 15:59:08 +0000 (23:59 +0800)]
va: pool: Replace all tabs with spaces in header file.

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

2 years agova: pool: Delete the GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT.
He Junyan [Sat, 23 Apr 2022 15:52:34 +0000 (23:52 +0800)]
va: pool: Delete the GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT.

The va pool is used for GPU side surface/image, its alignment should
not be changed arbitrarily by others. So we decide not to expose the
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT flag anymore.
Instead, user can call gst_buffer_pool_config_set_va_alignment() to
set its surface/image alignment.

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

2 years agova: pool: Add set_va_alignment() API.
He Junyan [Sat, 23 Apr 2022 15:40:14 +0000 (23:40 +0800)]
va: pool: Add set_va_alignment() API.

We want to use gst_buffer_pool_config_set_va_alignment() to replace
gst_buffer_pool_config_get_video_alignment(). The later one is specific
for GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT option.

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

2 years agortptwcc: don't map the buffer twice
Havard Graff [Fri, 22 Apr 2022 10:19:03 +0000 (12:19 +0200)]
rtptwcc: don't map the buffer twice

...and use the pt extracted rather than the one from RTPPacketInfo
when logging.

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

2 years agortpsession: Emit "notify::stats" when we update stats from RR or SR
Thibault Saunier [Fri, 22 Apr 2022 02:41:16 +0000 (02:41 +0000)]
rtpsession: Emit "notify::stats" when we update stats from RR or SR

Sensibily optimizing caching the pspecs and using them directly

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

2 years agooggdemux: Protect against invalid framerates
Edward Hervey [Tue, 26 Apr 2022 07:29:39 +0000 (09:29 +0200)]
oggdemux: Protect against invalid framerates

This check wasn't done for all mappings.

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

2 years agoav1parse: Fix a latent memory leak in colorimetry setting.
He Junyan [Mon, 25 Apr 2022 17:16:06 +0000 (01:16 +0800)]
av1parse: Fix a latent memory leak in colorimetry setting.

Also delete the useless "have_cinfo" judgement.

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

2 years agoav1parse: Correct the meaning of color_range flag.
He Junyan [Sun, 24 Apr 2022 14:54:58 +0000 (22:54 +0800)]
av1parse: Correct the meaning of color_range flag.

According to spec:
color range equal to 0 shall be referred to as the studio swing
representation and color range equal to 1 shall be referred to as
the full swing representation.

The current status is just the opposite.

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

2 years agoqsvencoder: Workaround for invalid DTS with VP9
Seungha Yang [Mon, 25 Apr 2022 13:59:14 +0000 (22:59 +0900)]
qsvencoder: Workaround for invalid DTS with VP9

SDK runtime seems to report zero DTS for all frames in case of VP9 but
we don't need to use DTS for the codec.

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

2 years agonvcodec: Stop building for non-{Windows,Linux} target
Seungha Yang [Sat, 23 Apr 2022 15:37:40 +0000 (00:37 +0900)]
nvcodec: Stop building for non-{Windows,Linux} target

The other platforms, specifically macOS have not been supported already
because this plugin loads so or dll. Moreover, NVIDIA dropped
support for macOS as of CUDA 11.0. See also
https://developer.nvidia.com/nvidia-cuda-toolkit-11_0_0-developer-tools-mac-hosts

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

2 years agosrtp: add unit tests
Stéphane Cerveau [Mon, 28 Mar 2022 15:06:46 +0000 (17:06 +0200)]
srtp: add unit tests

Enable unit tests in meson.build
Add test_play_key_error to check the stats

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

2 years agosrtpdec: add counts in stats
Stéphane Cerveau [Fri, 25 Mar 2022 16:47:23 +0000 (17:47 +0100)]
srtpdec: add counts in stats

In order to count the buffers which have been received and dropped for
decryption reason, add a stats to track it.

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

2 years agod3d11videosink: Fix for unhandled mouse double click events
Seungha Yang [Fri, 22 Apr 2022 19:00:21 +0000 (04:00 +0900)]
d3d11videosink: Fix for unhandled mouse double click events

Only window created with CS_DBLCLKS style can receive those mouse
double click events, so we need to use the style for internal/external
windows can get double click events.

Also, passthrough mouse events to parent window in the same message pumping
threads instead of manually forwarding each mouse event.

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

2 years agortpredenc: quieten warning about ignoring header extensions
Mathieu Duponchelle [Fri, 22 Apr 2022 23:57:53 +0000 (01:57 +0200)]
rtpredenc: quieten warning about ignoring header extensions

Turn it into a FIXME, and only log once

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

2 years agoMeson: Fix deprecation warnings
Xavier Claessens [Mon, 7 Mar 2022 13:46:57 +0000 (08:46 -0500)]
Meson: Fix deprecation warnings

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

2 years agorvsg: fix cairo include
Stéphane Cerveau [Fri, 22 Apr 2022 15:44:06 +0000 (17:44 +0200)]
rvsg: fix cairo include

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

2 years agoRevert "videorate: Update the base time on segment updates"
Sebastian Dröge [Thu, 21 Apr 2022 08:41:43 +0000 (11:41 +0300)]
Revert "videorate: Update the base time on segment updates"

This reverts commit 75b4809ebc23814009bebc70c775ab44d85decf2.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2186

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

2 years agoRevert "videorate: Add test for segment update"
Sebastian Dröge [Thu, 21 Apr 2022 08:41:36 +0000 (11:41 +0300)]
Revert "videorate: Add test for segment update"

This reverts commit a76f38b2c7ddbed546bb058c32ebcf8a553c003f.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2186

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

2 years agoRevert "videorate: Only "close" the segment if it is discontinous"
Sebastian Dröge [Thu, 21 Apr 2022 08:41:25 +0000 (11:41 +0300)]
Revert "videorate: Only "close" the segment if it is discontinous"

This reverts commit 6f7922b4dbba5ed780e7b0988669a81848a9e333.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2186

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

2 years agoRevert "videorate: Drop incoming buffers that are outside of the segment"
Sebastian Dröge [Thu, 21 Apr 2022 08:41:15 +0000 (11:41 +0300)]
Revert "videorate: Drop incoming buffers that are outside of the segment"

This reverts commit 24fd80344dbc059b72e13d813ca82f414a9d6cce.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2186

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

2 years agoRevert "videorate: Add unit test for closing a segment and opening a separate one"
Sebastian Dröge [Thu, 21 Apr 2022 08:40:47 +0000 (11:40 +0300)]
Revert "videorate: Add unit test for closing a segment and opening a separate one"

This reverts commit 98f2a84a289ed4d4cfac9bc5c73182a56eefa99c.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2186

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

2 years agortprtxsend: mark RTX buffers with GST_RTP_BUFFER_FLAG_RETRANSMISSION
Havard Graff [Mon, 1 Feb 2021 09:36:42 +0000 (10:36 +0100)]
rtprtxsend: mark RTX buffers with GST_RTP_BUFFER_FLAG_RETRANSMISSION

It is useful for elements downstream from rtxsend to know if the RTP
buffer they are dealing with is an RTX buffer or not.

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

2 years agocuda-converter: fix nvrtc compilation on non-English locale systems
Corentin Damman [Fri, 22 Apr 2022 10:29:29 +0000 (12:29 +0200)]
cuda-converter: fix nvrtc compilation on non-English locale systems

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

2 years agortspclientsink: fix possible shutdown deadlock collect_streams()
Pierre Bourré [Tue, 15 Feb 2022 13:39:43 +0000 (13:39 +0000)]
rtspclientsink: fix possible shutdown deadlock collect_streams()

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

2 years agovideoaggregator: keep old buffer when processing a MISSING_DATA gap
Mathieu Duponchelle [Thu, 26 Nov 2020 17:18:52 +0000 (18:18 +0100)]
videoaggregator: keep old buffer when processing a MISSING_DATA gap

GAP events flagged with MISSING_DATA are transformed into GAP buffers
flagged with CORRUPTED.

In these cases, it is preferable to simply keep rendering the previous
buffer (if there was one) instead of flashing the pad in and out of
view.

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

2 years agocompositor: fix prepare_frame obscuring check
Mathieu Duponchelle [Thu, 26 Nov 2020 17:16:10 +0000 (18:16 +0100)]
compositor: fix prepare_frame obscuring check

A pad without a buffer or with a GAP buffer cannot obscure a
pad below it. Ignore those when considering whether a pad should
be drawn.

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

2 years agocompositor: a pad without a frame can't obscure the background
Mathieu Duponchelle [Thu, 26 Nov 2020 14:57:10 +0000 (15:57 +0100)]
compositor: a pad without a frame can't obscure the background

Skip those when considering whether the background should be
drawn

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

2 years agoaggregator: forward gap event information to gap buffer
Mathieu Duponchelle [Thu, 26 Nov 2020 17:11:12 +0000 (18:11 +0100)]
aggregator: forward gap event information to gap buffer

When the GAP event was flagged with MISSING_DATA, subclasses
may want to adopt a different behaviour, for example by repeating
the last buffer.

As we turn these gap events into gap buffers, we need to flag
those, we do so with a new custom meta.

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

2 years agoUpdate proxy-libintl wrap to 0.4
Xavier Claessens [Thu, 21 Apr 2022 13:52:36 +0000 (09:52 -0400)]
Update proxy-libintl wrap to 0.4

It has fixes for Windows static build.

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

2 years agowebrtcbin: Avoid access of freed memory
Sangchul Lee [Wed, 20 Apr 2022 15:38:37 +0000 (00:38 +0900)]
webrtcbin: Avoid access of freed memory

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

2 years agomp4mux: fix spelling
Tristan Matthews [Tue, 19 Apr 2022 22:40:31 +0000 (18:40 -0400)]
mp4mux: fix spelling

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

2 years agova: h264enc: Do not let L0 number surplus the HW limitation.
He Junyan [Fri, 15 Apr 2022 14:19:09 +0000 (22:19 +0800)]
va: h264enc: Do not let L0 number surplus the HW limitation.

The algorithm to calculate the L0/L1 number may let the L0 number
surplus the HW limitation. We should ensure that limitation after
that calculation.

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

2 years agovideoscale: Add test to ensure that non-scaled metas are kept
Olivier Crête [Wed, 20 Apr 2022 21:25:49 +0000 (16:25 -0500)]
videoscale: Add test to ensure that non-scaled metas are kept

Just make sure that we're not breaking non-scaled metas

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

2 years agovideoscale: Add test for transform_meta function
James Cowgill [Wed, 2 Feb 2022 15:28:15 +0000 (15:28 +0000)]
videoscale: Add test for transform_meta function

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

2 years agovideoscale: Don't copy scaled metas
James Cowgill [Wed, 2 Feb 2022 15:28:21 +0000 (15:28 +0000)]
videoscale: Don't copy scaled metas

Returning TRUE from the `transform_meta` function tells
GstBaseTransform to copy the meta into the new buffer. If videoscale
has already transformed a meta by scaling it, it should always return
FALSE to avoid duplicating the meta.

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

2 years agox11: Fix unused variable warnings
Nirbheek Chauhan [Fri, 1 Apr 2022 09:46:20 +0000 (15:16 +0530)]
x11: Fix unused variable warnings

These are emitted when XInput 2 is not available.

```
../subprojects/gst-plugins-base/sys/ximage/ximagesink.c: In function ‘gst_x_image_sink_handle_xevents’:
../subprojects/gst-plugins-base/sys/ximage/ximagesink.c:696:29: warning: unused variable ‘state’ [-Wunused-variable]
  696 |   GstNavigationModifierType state = GST_NAVIGATION_MODIFIER_NONE;
      |                             ^~~~~
../subprojects/gst-plugins-base/sys/ximage/ximagesink.c:694:35: warning: unused variable ‘touch_frame_open’ [-Wunused-variable]
  694 |   gboolean pointer_moved = FALSE, touch_frame_open = FALSE;
      |                                   ^~~~~~~~~~~~~~~~
../subprojects/gst-plugins-base/sys/xvimage/xvimagesink.c: In function ‘gst_xv_image_sink_handle_xevents’:
../subprojects/gst-plugins-base/sys/xvimage/xvimagesink.c:427:35: warning: unused variable ‘touch_frame_open’ [-Wunused-variable]
  427 |   gboolean pointer_moved = FALSE, touch_frame_open = FALSE;
      |                                   ^~~~~~~~~~~~~~~~
../subprojects/gst-plugins-base/sys/xvimage/xvimagesink.c:426:29: warning: unused variable ‘state’ [-Wunused-variable]
  426 |   GstNavigationModifierType state = GST_NAVIGATION_MODIFIER_NONE;
      |                             ^~~~~
```

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

2 years agomingw: Remove deprecated section in example cross file
Xavier Claessens [Thu, 31 Mar 2022 12:50:47 +0000 (08:50 -0400)]
mingw: Remove deprecated section in example cross file

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

2 years agomeson: Add PYTHONPATH to load GDB helper module
Xavier Claessens [Fri, 25 Feb 2022 21:54:37 +0000 (16:54 -0500)]
meson: Add PYTHONPATH to load GDB helper module

Meson generates a gdbinit file that will automatically load gstreamer
script. However that script uses a helper python module that needs
PYTHONPATH to be pointing into the right location in the source
tree to be able to find gst_gdb.py.

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

2 years agomultiudpsink: allow binding to IPv6 address
Jonas Bonn [Fri, 21 Jan 2022 13:21:18 +0000 (14:21 +0100)]
multiudpsink: allow binding to IPv6 address

When the sink is configured to create sockets with an explicit bind
address, then the created socket gets set to the udp_socket field
irregardless of whether the bind address indicated that the socket
family should be IPv4 or IPv6.  When binding to an IPv6 address, this
results in the following error:

gstmultiudpsink.c:1285:gst_multiudpsink_configure_client:<rtcpsink>
error: Invalid address family (got 10)

This patch adds a check of the address family being bound to and sets
the created socket to used_socket or used_socket_v6, accordingly.

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

2 years agortphdrextsdes: fixup test trying to g_free a local variable
Camilo Celis Guzman [Mon, 18 Apr 2022 09:20:00 +0000 (18:20 +0900)]
rtphdrextsdes: fixup test trying to g_free a local variable

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

2 years agohls/m3u8: Fix starting segment for live playlist
Edward Hervey [Thu, 21 Apr 2022 09:47:55 +0000 (11:47 +0200)]
hls/m3u8: Fix starting segment for live playlist

RFC 8216 6.3.3 "Playing the Media Playlist File" : states that for live media
playlists "the client SHOULD NOT choose a segment that starts less than three
target durations from the end of the Playlist file"

This is an off-by-one error. Since we are looking for the "index" of the
segment, we need to subtract 1 from the searched position.

Ex: For a playlist with 12 entries, we want to start playback on the 9th segment
... which is at index 8.

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

2 years agotest: Add test cases for the H265 bitwriter.
He Junyan [Wed, 2 Mar 2022 06:42:42 +0000 (14:42 +0800)]
test: Add test cases for the H265 bitwriter.

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

2 years agocodecparsers: bitwriter: Add the common bit writer functions for H265.
He Junyan [Wed, 2 Mar 2022 06:31:05 +0000 (14:31 +0800)]
codecparsers: bitwriter: Add the common bit writer functions for H265.

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

2 years agova: vpp: Update the colorimetry and HDR fields when fixup src caps.
He Junyan [Wed, 20 Apr 2022 05:18:34 +0000 (13:18 +0800)]
va: vpp: Update the colorimetry and HDR fields when fixup src caps.

When we fixup src caps, the current way of handling the HDR fields is not
correct.
1. We trim the HDR fields only when the input caps is not a subset of the
fixup src caps. But in fact, the input caps with HDR fields such as the
"mastering-display-info" can possibly be the subset of the fixup src caps,
if they have all same other fields.
2. We always copy the colorimetry from input caps to src caps if it is
absent. But when hdr-tone-mapping is enabled, the HDR->SDR conversion makes
the colorimetry change. We should use downstream's setting, or just use the
default colorimetry of SDR.

We changes to:
1. If hdr-tone-mapping is enabled, we trim all HDR fields and add a correct
colorimetry.
2. Copy colorimetry from input if it is still absent.
3. Consider the subset replacement.

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

2 years agovalidate: Do not print Known error tests
Thibault Saunier [Thu, 21 Apr 2022 14:38:24 +0000 (10:38 -0400)]
validate: Do not print Known error tests

Those are passing tests in practice and it doesn't give any useful information

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

2 years agotests: convertscale: Do not log EOS events in validateflow
Thibault Saunier [Thu, 21 Apr 2022 14:21:37 +0000 (10:21 -0400)]
tests: convertscale: Do not log EOS events in validateflow

We already checked that we are getting an EOS before going back to ready
and adding the EOS at the end of the .validateflow is racy as the ERROR
message might reach the bus before it is logged.

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

2 years agoci: Trigger cerbero on user project if a branch with the same name exists there
Thibault Saunier [Thu, 21 Apr 2022 14:14:00 +0000 (10:14 -0400)]
ci: Trigger cerbero on user project if a branch with the same name exists there

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

2 years agodocs:examples: Fix building iOS examples
Thibault Saunier [Thu, 21 Apr 2022 13:18:56 +0000 (09:18 -0400)]
docs:examples: Fix building iOS examples

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

2 years agovalidate:pipeline-monitor: Minor cleanup setting unused variable
Thibault Saunier [Tue, 19 Apr 2022 22:38:12 +0000 (18:38 -0400)]
validate:pipeline-monitor: Minor cleanup setting unused variable

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

2 years agovideoconvertscale: Add properties to disable scaling/converting in videoconvert/video...
Thibault Saunier [Thu, 14 Apr 2022 13:48:14 +0000 (09:48 -0400)]
videoconvertscale: Add properties to disable scaling/converting in videoconvert/videoscale

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

2 years agovalidate: scenario: Add a 'allow-error' configuration
Thibault Saunier [Thu, 14 Apr 2022 13:09:35 +0000 (09:09 -0400)]
validate: scenario: Add a 'allow-error' configuration

This new configuration allows the scenario to keep running even
after receiving an "error" message on the bus.

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

2 years agovideoconvertscale: Don't claim we can support any kind of memory
Thibault Saunier [Fri, 21 May 2021 22:55:25 +0000 (18:55 -0400)]
videoconvertscale: Don't claim we can support any kind of memory

Since d0133a2d11566ff4c0cded7af8dfdff0046e0e8b "videoconvert: Allow
passthrough for ANY caps features" videoconvert will always claim that
it supports any kind of memory which is true in very specific case (when
it is running in passthrough mode). To get elements that autoplug
converters depending on the caps running in the pipeline (like
autovideoconvert), we need to have converters no lie about what they can
do when queried `accept_caps` or `query_caps`.

This still accepts any caps feature as before but it introduces
a restriction in the way we handle memory capsfeatures.

We keep previous behaviour in videoconvert and videoscale.

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

2 years agoIntroduce the videocolorscale element
Thibault Saunier [Fri, 17 Apr 2020 19:23:03 +0000 (15:23 -0400)]
Introduce the videocolorscale element

Now that videoconvert and videoscale's are both based on
GstVideoConverter and are using the exact same code, it makes much more
sense to have one element doing the two operation, and it can be
more efficient in some cases (one single path for both operations).

This removes the `videoscale` and `videoconvert` plugins but keeps the element
but makes them also do both operations (adding some APIs to each element).

There is a small change in API for the `videoscale:dither` property which
was previously a totally unused boolean, it is now an enum and is used.

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

2 years agoqsv: Add GPU description to element long-name on Windows
Seungha Yang [Wed, 20 Apr 2022 14:06:56 +0000 (23:06 +0900)]
qsv: Add GPU description to element long-name on Windows

Would be useful for a multi-Intel-GPU system

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

2 years agohls: Relax webvtt checks
Edward Hervey [Wed, 20 Apr 2022 12:50:35 +0000 (14:50 +0200)]
hls: Relax webvtt checks

If no hour field is present (which is allowed), the remaining data can be less
than 15 character.

Fix time translation failures if the hour field wasn't present

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

2 years agovapostproc: Notify if hdr-tone-mapping property changes.
Víctor Manuel Jáquez Leal [Tue, 19 Apr 2022 19:38:31 +0000 (21:38 +0200)]
vapostproc: Notify if hdr-tone-mapping property changes.

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

2 years agogstleaks: log the number of alive objects
Guillaume Desmottes [Wed, 20 Apr 2022 07:38:16 +0000 (09:38 +0200)]
gstleaks: log the number of alive objects

Can help checking if the number of alive objects is growing over time or stays stable.

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

2 years agova: Expose a couple va surface/buffer methods.
Víctor Manuel Jáquez Leal [Wed, 30 Mar 2022 16:09:36 +0000 (18:09 +0200)]
va: Expose a couple va surface/buffer methods.

And use them in va plugin.

Also, set as default logging category the vadisplay one.

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

2 years agortpmanager: Move some duplicated constant and helper function to a single place
Sebastian Dröge [Wed, 20 Apr 2022 07:53:16 +0000 (10:53 +0300)]
rtpmanager: Move some duplicated constant and helper function to a single place

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

2 years agogstreamer: Document various caps for the reference timestamp meta
Sebastian Dröge [Tue, 19 Apr 2022 11:05:16 +0000 (14:05 +0300)]
gstreamer: Document various caps for the reference timestamp meta

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

2 years agortpbin/rtpjitterbuffer: Don't parse RTCP SRs twice unless needed
Sebastian Dröge [Mon, 18 Apr 2022 13:22:50 +0000 (16:22 +0300)]
rtpbin/rtpjitterbuffer: Don't parse RTCP SRs twice unless needed

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