platform/upstream/gstreamer.git
3 years agod3d11desktopdup: Support desktop switches
Jakub Adam [Thu, 29 Apr 2021 20:10:15 +0000 (22:10 +0200)]
d3d11desktopdup: Support desktop switches

Before creating output duplication interface, call SetThreadDesktop()
with HDESK of the current input desktop in case a desktop switch has
occurred.

This allows d3d11desktopdupsrc to capture Windows User Account Control
(UAC) prompts, which appear on a separate secure desktop. Otherwise
IDXGIOutput1::DuplicateOutput() will return E_ACCESSDENIED and the
element won't produce any frames as long as the UAC screen is active.

Note that in order to access secure desktop the application still has to
run at LOCAL_SYSTEM privileges. For GStreamer applications running with
regular user privileges this change has no effect.

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

3 years agodxgicapture: reinitialize duplication interface on ERROR_ACCESS_LOST
Jakub Adam [Tue, 27 Apr 2021 18:08:30 +0000 (18:08 +0000)]
dxgicapture: reinitialize duplication interface on ERROR_ACCESS_LOST

IDXGIOutputDuplication can become invalid for example when there's
desktop switch, resolution change or Windows User Account Control prompt
appears on screen.

When that happens, try to re-create the duplication interface for the
changed output. Note that in the case of UAC prompt this operation will
fail if the GStreamer process doesn't run at LOCAL_SYSTEM privileges. In
such situation the source element won't create any frames as long as the
output is occupied by UAC screen.

In order to enable UAC access to sufficiently privileged GStreamer
processes, call SetThreadDesktop() with the desktop handle that
currently receives user input before creating our output duplication.

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

3 years agomsdk: set correct parameters for BGRx frame
Haihao Xiang [Thu, 29 Apr 2021 01:35:51 +0000 (09:35 +0800)]
msdk: set correct parameters for BGRx frame

Otherwise when mapping BGRx frame onto CPU's memory, CPU will get wrong
data for B, G, R components

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

3 years agowebrtc: advertise support for transport-cc rtcp-fb by default
Matthew Waters [Thu, 29 Apr 2021 11:12:42 +0000 (21:12 +1000)]
webrtc: advertise support for transport-cc rtcp-fb by default

Still requires explicit enabling by the application through the header
extension on all the relevant payloaders.

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

3 years agowebrtc/stats: provide the twcc stats when available
Matthew Waters [Thu, 29 Apr 2021 11:11:25 +0000 (21:11 +1000)]
webrtc/stats: provide the twcc stats when available

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

3 years agova: allocator: Disable derived for Gallium if RGB and reading.
Víctor Manuel Jáquez Leal [Wed, 28 Apr 2021 08:52:29 +0000 (10:52 +0200)]
va: allocator: Disable derived for Gallium if RGB and reading.

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

3 years agova: allocator: Disable derived for i965 if YUV and writing.
Víctor Manuel Jáquez Leal [Thu, 22 Apr 2021 15:08:13 +0000 (17:08 +0200)]
va: allocator: Disable derived for i965 if YUV and writing.

The problem is for uploading YUV frames using derived images, is that
derived images imply tiling, so frames are wrongly uploaded.

Though derived for reading might work we cannot know the Intel graphics
generation to validate the caching. Overall, it's safer to disable derived
images for i965.

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

3 years agova: display: Fix typo.
Víctor Manuel Jáquez Leal [Thu, 22 Apr 2021 15:07:28 +0000 (17:07 +0200)]
va: display: Fix typo.

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

3 years agova: allocator: Hack for i965 to get linear RGB DMABufs.
Víctor Manuel Jáquez Leal [Thu, 22 Apr 2021 10:42:35 +0000 (12:42 +0200)]
va: allocator: Hack for i965 to get linear RGB DMABufs.

i965 driver has a hack to provide linear dmabufs, which is required for RGB
formats, since they are directly uploaded by glupload, ignoring tiled modifiers.

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

3 years agova: postproc: Remove unused parameter.
Víctor Manuel Jáquez Leal [Thu, 22 Apr 2021 13:51:27 +0000 (15:51 +0200)]
va: postproc: Remove unused parameter.

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

3 years agova: postproc: Set usage hint generic if DMABuf.
Víctor Manuel Jáquez Leal [Wed, 31 Mar 2021 09:04:17 +0000 (11:04 +0200)]
va: postproc: Set usage hint generic if DMABuf.

iHD driver sets a tiled DRM modifier if surface's usage hint is set to
VPP_WRITE. This result in a garbled rendering when using glimagesink.

This patch changes the usage hint to generic if the caps feature is
DMABuf. Either way only iHD driver, so far, uses the usage hint flag.

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

3 years agova: postproc: Get info from caps in decide_allocation()
Víctor Manuel Jáquez Leal [Tue, 20 Apr 2021 10:52:26 +0000 (12:52 +0200)]
va: postproc: Get info from caps in decide_allocation()

decide_allocation() occurs before set_caps(), where out_info is set,
thus setting srcpad_info with zeros or old values. Instead of it, the
caps, from the allocation query, are converted and used.

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

3 years agoavtp: crf: Remove superfluous sink_event variable
Timo Wischer [Fri, 23 Apr 2021 11:56:43 +0000 (13:56 +0200)]
avtp: crf: Remove superfluous sink_event variable

This variable was introduced by commit 12ad2a4bcd6c ("avtp: Introduce
the CRF Sync Element") but it was never used:
$ git log -G "sink_event" -- ext/avtp

Signed-off-by: Timo Wischer <timo.wischer@de.bosch.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2201>

3 years agomsdkh265dec: Add support for error report too
Haihao Xiang [Mon, 17 Feb 2020 06:11:15 +0000 (14:11 +0800)]
msdkh265dec: Add support for error report too

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

3 years agomsdkh264dec: report error to user
Haihao Xiang [Fri, 6 Dec 2019 04:48:37 +0000 (12:48 +0800)]
msdkh264dec: report error to user

Sometimes user want to know what the error is when decoding a stream,
This commit adds a property of report-error to msdkh264dec. When
report-error is TRUE, msdkh264dec may catch bitstream error and frame
corruption, then report the error to application by using GST_ELEMENT_ERROR

Refer to the code in
https://github.com/Intel-Media-SDK/MediaSDK/tree/master/samples

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

3 years agomsdkdec: allow sub class to add extra parameters for additional configuration
Haihao Xiang [Fri, 6 Dec 2019 04:02:50 +0000 (12:02 +0800)]
msdkdec: allow sub class to add extra parameters for additional configuration

MSDK allows user add extended buffers to a bitstream for additional
configuration. This commit is to support this feature in this plugin

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

3 years agod3d11: Handle device change
Seungha Yang [Tue, 27 Apr 2021 12:52:31 +0000 (21:52 +0900)]
d3d11: Handle device change

If incoming buffer holds other d3d11 device, and user wants any device
(i.e., adapter index wasn't specified explicitly) update our device
with that of buffer.

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

3 years agod3d11videosink: Delay window setup as much as possible
Seungha Yang [Fri, 23 Apr 2021 10:29:55 +0000 (19:29 +0900)]
d3d11videosink: Delay window setup as much as possible

... so that videosink can handle device update with
d3d11 device of the first buffer

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

3 years agod3d11: Don't accept buffer pool which holds different device
Seungha Yang [Fri, 23 Apr 2021 09:44:41 +0000 (18:44 +0900)]
d3d11: Don't accept buffer pool which holds different device

At the moment, d3d11 plugin doesn't support texture sharing between
different device

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

3 years agod3d11decoder: Run gst-indent
Seungha Yang [Fri, 23 Apr 2021 09:45:48 +0000 (18:45 +0900)]
d3d11decoder: Run gst-indent

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

3 years agoonnx: add plugin to apply ONNX neural network models to video
Aaron Boxer [Tue, 23 Feb 2021 16:56:53 +0000 (11:56 -0500)]
onnx: add plugin to apply ONNX neural network models to video

This MR provides a transform element that leverage ONNX runtime
to run AI inference on a broad range of neural network toolkits, running
on either CPU or GPU. ONNX supports 16 different providers at the
moment, so with ONNX we immediately get support for Nvidia, AMD, Xilinx
and many others.

For the first release, this plugin adds a gstonnxobjectdetector element to
detect objects in video frames. Meta data generated by the model is
attached to the video buffer as a custom GstObjectDetectorMeta meta.

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

3 years agodecklinkvideosrc: Fix AFD/Bar VANC size check
Sebastian Dröge [Mon, 26 Apr 2021 15:00:27 +0000 (18:00 +0300)]
decklinkvideosrc: Fix AFD/Bar VANC size check

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

3 years agodecklinkvideosrc: Automatically detect widescreen vs. normal NTSC/PAL
Sebastian Dröge [Fri, 23 Apr 2021 15:05:06 +0000 (18:05 +0300)]
decklinkvideosrc: Automatically detect widescreen vs. normal NTSC/PAL

Based on the AFD aspect ratio flag the source can detect (in mode=auto)
whether this NTSC/PAL mode is actually a normal or a widescreen one and
select the caps according to that.

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

3 years agojpegparse: Don't generate timestamp for 0/1 framerates
Olivier Crête [Tue, 30 Mar 2021 16:39:21 +0000 (12:39 -0400)]
jpegparse: Don't generate timestamp for 0/1 framerates

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

3 years agod3d11decoder: Set flushing to internal pool on flush event
Seungha Yang [Fri, 23 Apr 2021 14:20:54 +0000 (23:20 +0900)]
d3d11decoder: Set flushing to internal pool on flush event

d3d11 decoders use internal pool for DPB texture and
Gst*Decoder::new_picture() will be blocked if internal pool is full.
We should be able to unblock in on flush-start event as expected.

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

3 years agod3d11: Fix wrong GstD3D11BufferPool type check
Seungha Yang [Fri, 23 Apr 2021 07:53:16 +0000 (16:53 +0900)]
d3d11: Fix wrong GstD3D11BufferPool type check

Fix typos

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

3 years agortpsrc: Fix wrong/NULL URI handling
Thibault Saunier [Wed, 31 Mar 2021 21:07:40 +0000 (18:07 -0300)]
rtpsrc: Fix wrong/NULL URI handling

We can reset the URI to NULL and this fix a deadlock in that case or
when the URI was invalid.

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

3 years agowebrtcbin: downgrade "dropping ICE candidates from SDP" from warning to debug level
Nazar Mokrynskyi [Thu, 22 Apr 2021 16:45:27 +0000 (16:45 +0000)]
webrtcbin: downgrade "dropping ICE candidates from SDP" from warning to debug level

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

3 years agowebrtcbin: Attach rtpbin even for data channels
Olivier Crête [Sat, 17 Apr 2021 00:39:35 +0000 (20:39 -0400)]
webrtcbin: Attach rtpbin even for data channels

This is required because the same transport may later be used for RTP.
In which case the RTCP needs to flow bi-directionnally already.

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

3 years agoFix missing unref of nice-agent causing sockets to never close.
Frederich Munch [Thu, 4 Mar 2021 08:41:09 +0000 (00:41 -0800)]
Fix missing unref of nice-agent causing sockets to never close.

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

3 years agowebrtc: Fix sctp task's return type.
Doug Nazar [Thu, 22 Apr 2021 20:09:40 +0000 (16:09 -0400)]
webrtc: Fix sctp task's return type.

GstWebRTCBinFunc expects a GstStructure* return type.

Fixes segfault on PowerPC.

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

3 years agomfvideoenc: Fix UWP build
Seungha Yang [Thu, 22 Apr 2021 06:50:15 +0000 (15:50 +0900)]
mfvideoenc: Fix UWP build

Add missing GST_MF_HAVE_D3D11 define guard

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

3 years agowasapi2: Fix UWP build
Seungha Yang [Thu, 22 Apr 2021 06:42:23 +0000 (15:42 +0900)]
wasapi2: Fix UWP build

KSAUDIO_SPEAKER_* defines are WINAPI_PARTITION_DESKTOP only

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

3 years agotsdemux: fix truncated output segment when seeking with a stop
Mathieu Duponchelle [Wed, 21 Apr 2021 19:43:59 +0000 (21:43 +0200)]
tsdemux: fix truncated output segment when seeking with a stop

In disabling the stop adjustment for negative rates in
03031037fafd2d535bbefb1fdf6024b5d1159043 , two instructions
were inverted resulting in the stop always being adjusted by
0

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

3 years agotests/netsim: Set src caps before creating buffers
Doug Nazar [Wed, 21 Apr 2021 03:51:49 +0000 (23:51 -0400)]
tests/netsim: Set src caps before creating buffers

GstHarness requires the source pad caps to be set before
buffer allocations.

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

3 years agod3d11: Add support for BGRx and RGBx formats
Seungha Yang [Mon, 19 Apr 2021 17:00:18 +0000 (02:00 +0900)]
d3d11: Add support for BGRx and RGBx formats

For such formats, we can re-use existing BGRA/RGBA implementations
but ignoring alpha channel

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

3 years agowasapi2: Implement default audio channel mask
Seungha Yang [Tue, 20 Apr 2021 09:37:15 +0000 (18:37 +0900)]
wasapi2: Implement default audio channel mask

Some capture devices might not provide channel mask value which will
result in capturing failure because of unknown channel mask in case
that device generates more than 2 channels. Although it might not
be correct, we can assume channel mask with the given number of channels.

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

3 years agowasapi2clinet: Simplify set caps
Seungha Yang [Tue, 20 Apr 2021 09:40:40 +0000 (18:40 +0900)]
wasapi2clinet: Simplify set caps

Don't need to iterate all structure to set identical values

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

3 years agowasapi2client: Run gst-indent
Seungha Yang [Tue, 20 Apr 2021 09:48:18 +0000 (18:48 +0900)]
wasapi2client: Run gst-indent

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

3 years agowebrtcbin test: Don't fail if data channel is created
Olivier Crête [Tue, 13 Apr 2021 21:35:58 +0000 (17:35 -0400)]
webrtcbin test: Don't fail if data channel is created

In tests that voluntarily create a data channel.

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

3 years agowebrtcbin: Filter caps isn't fixed
Olivier Crête [Mon, 19 Apr 2021 23:06:50 +0000 (19:06 -0400)]
webrtcbin: Filter caps isn't fixed

Fix an assertion because the filter paramter passed to
gst_caps_is_equal_fixed() wasn't fixed. So use the regular
gst_caps_is_equal() instead.

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

3 years agod3d11: Update plugin doc cache
Seungha Yang [Mon, 19 Apr 2021 17:04:03 +0000 (02:04 +0900)]
d3d11: Update plugin doc cache

Updating for removed d3d11videosink wrapper bin and the change of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2113

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

3 years agod3d11: Remove d3d11videosink wrapper bin
Seungha Yang [Sat, 17 Apr 2021 11:37:13 +0000 (20:37 +0900)]
d3d11: Remove d3d11videosink wrapper bin

Drop d3d11videosink wrapper bin and handle texture upload
in d3d11videosink.

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

3 years agowebrtcdsp: Propagate VAD to audio level meta
Philippe Normand [Sun, 18 Apr 2021 12:49:59 +0000 (13:49 +0100)]
webrtcdsp: Propagate VAD to audio level meta

Whenever the voice activity changed on the stream, update or create an
AudioLevelMeta and associate it to the corresponding buffer.

Fixes #1073

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

3 years agocccombiner: Use correct enum when registering the max-scheduled property
Sebastian Dröge [Mon, 19 Apr 2021 10:06:23 +0000 (13:06 +0300)]
cccombiner: Use correct enum when registering the max-scheduled property

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

3 years agowpe: Remove code targeting WebKit < 2.24
Thibault Saunier [Thu, 15 Apr 2021 18:06:59 +0000 (14:06 -0400)]
wpe: Remove code targeting WebKit < 2.24

We already depend on wk >= 2.24

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

3 years agowpe: Make threaded view singleton creation thread safe
Thibault Saunier [Thu, 15 Apr 2021 17:28:42 +0000 (13:28 -0400)]
wpe: Make threaded view singleton creation thread safe

It was leading to interesting failures.

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

3 years agod3d11: pluginutils: Fix wrong gst_memory_unmap() on _map() failure
Seungha Yang [Wed, 14 Apr 2021 15:02:55 +0000 (00:02 +0900)]
d3d11: pluginutils: Fix wrong gst_memory_unmap() on _map() failure

It was obvious typo

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

3 years agotests/avtp: increase timeout of test_depayloader_fragmented_big
Doug Nazar [Tue, 13 Apr 2021 21:15:22 +0000 (17:15 -0400)]
tests/avtp: increase timeout of test_depayloader_fragmented_big

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

3 years agocheck: fix dash_mpdparser_check_mpd_client_set_methods test.
Doug Nazar [Wed, 14 Apr 2021 05:59:23 +0000 (01:59 -0400)]
check: fix dash_mpdparser_check_mpd_client_set_methods test.

Setting guint64 valist properties without type specifier fails
on 32bit archs.

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

3 years agoline21enc: fix remove-caption-meta property test
Doug Nazar [Tue, 13 Apr 2021 20:34:15 +0000 (16:34 -0400)]
line21enc: fix remove-caption-meta property test

It's possible for the same address to be allocated to the decoded
metadata. Switch test to actual detect if it was removed.

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

3 years agotests: fix shm test deadlock
Doug Nazar [Tue, 13 Apr 2021 10:40:43 +0000 (06:40 -0400)]
tests: fix shm test deadlock

Stopping the consumer first would occasionally allow the producer
to fill the shm segment causing it to block in send() and unable
to be stopped.

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

3 years agocheck: Fix test dash_mpdparser_xlink_period
Doug Nazar [Tue, 13 Apr 2021 09:54:37 +0000 (05:54 -0400)]
check: Fix test dash_mpdparser_xlink_period

Test used http://404/ERROR/XML.period as an invalid url. Curl now
interprets that as an 32bit int and tries an actual connect which
timesout. Use .invalid as an IANA reserved domain for invalid DNS.

curl -v http://404/ERROR/XML.period
*   Trying 0.0.1.148:80...

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

3 years agova: allocator: Fix an unmap typo in _va_copy.
He Junyan [Tue, 13 Apr 2021 07:42:09 +0000 (15:42 +0800)]
va: allocator: Fix an unmap typo in _va_copy.

No need to unmap the the src memory when failing to allocate the
dst mem. It has not been mapped yet.

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

3 years agomsdk: don't fall back to the default device
Haihao Xiang [Tue, 6 Apr 2021 04:03:32 +0000 (12:03 +0800)]
msdk: don't fall back to the default device

Ohterwise when user set a wrong device, the warning message doesn't get
printed if user doesn't set a right debug level in the environment, this
behavior might mislead user that the wrong device is being used.

This fixed https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1567

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

3 years agowebrtcbin: Simplify answer_caps intersection code a little
Olivier Crête [Mon, 12 Apr 2021 21:54:31 +0000 (17:54 -0400)]
webrtcbin: Simplify answer_caps intersection code a little

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

3 years agowebrtcbin test: Wait for set-local-desc & set-remote-desc to continue
Olivier Crête [Mon, 12 Apr 2021 19:35:41 +0000 (15:35 -0400)]
webrtcbin test: Wait for set-local-desc & set-remote-desc to continue

To avoid racing betwen the SDPs being set and the next step of the
test, let's wait for setting the SDP both locally and remotely to succeed.
of the test

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

3 years agowebrtcbin: Move GstPromise reply to operation framework
Olivier Crête [Thu, 1 Apr 2021 18:51:30 +0000 (14:51 -0400)]
webrtcbin: Move GstPromise reply to operation framework

This makes it possible to reply to all promises in a consistent way
without having to do a unlock/relock that is always risky.

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

3 years agowebrtcbin: Make sure PC_LOCK is release when replying to promise
Olivier Crête [Thu, 1 Apr 2021 18:41:11 +0000 (14:41 -0400)]
webrtcbin: Make sure PC_LOCK is release when replying to promise

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

3 years agowebrtcbin: Take PC lock around all entry points
Olivier Crête [Wed, 31 Mar 2021 15:56:10 +0000 (11:56 -0400)]
webrtcbin: Take PC lock around all entry points

All of those action signals change the internal state, so
protect it by using the PC_LOCK

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

3 years agowebrtcbin: Take PC_LOCK when requesting new pad
Olivier Crête [Wed, 31 Mar 2021 15:49:36 +0000 (11:49 -0400)]
webrtcbin: Take PC_LOCK when requesting new pad

This is needed to avoid having the state change under us.

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

3 years agowebrtcbin test: Add for the case where a second m-line is renegotiated
Olivier Crête [Wed, 31 Mar 2021 15:41:45 +0000 (11:41 -0400)]
webrtcbin test: Add for the case where a second m-line is renegotiated

This is for the case where there answerer forces a specific media type
for a m-line, but he origin offer only has the other media type. In this
case, we will create a second transceiver on receiving the offer and add
the desired media type using renegotiation.

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

3 years agowebrtcbin: Ensure that query caps method returns valid caps
Olivier Crête [Wed, 31 Mar 2021 15:40:28 +0000 (11:40 -0400)]
webrtcbin: Ensure that query caps method returns valid caps

This means rejecting any caps that aren't fixed. Also, use a filter
that will create unfixed caps if the other side just returns ANY.

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

3 years agowebrtcbin: Associate the stream with a new transceiver
Olivier Crête [Wed, 31 Mar 2021 15:33:21 +0000 (11:33 -0400)]
webrtcbin: Associate the stream with a new transceiver

Otherwise, this newly created transceiver has no stream and it
aborts later when it tries to connect the input pad.

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

3 years agowebrtcbin: Match unassociated transceiver by kind too
Olivier Crête [Wed, 31 Mar 2021 15:30:16 +0000 (11:30 -0400)]
webrtcbin: Match unassociated transceiver by kind too

When a new m-line comes in that doesn't have a transceiver, only match
existing transceivers of the same kind.

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

3 years agowebrtcbin: Fix typoe in name of error GstStructure
Olivier Crête [Tue, 30 Mar 2021 22:01:56 +0000 (18:01 -0400)]
webrtcbin: Fix typoe in name of error GstStructure

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

3 years agowebrtc test: Verify that forcing different kinds on peers fails
Olivier Crête [Tue, 30 Mar 2021 20:16:50 +0000 (16:16 -0400)]
webrtc test: Verify that forcing different kinds on peers fails

If the offer contains an audio kind and a video kind, forcing them both
at m-line zero will fail.

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

3 years agowebrtc tests: Verify that create-offer is rejected when needed
Olivier Crête [Tue, 30 Mar 2021 20:04:33 +0000 (16:04 -0400)]
webrtc tests: Verify that create-offer is rejected when needed

Verify that it gets rejected if a m-line at index 1 is requested but
there is no m-line 0.

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

3 years agowebrtcbin test: Add test for various cases where get_request_pad is meant to fail
Olivier Crête [Mon, 29 Mar 2021 23:47:21 +0000 (19:47 -0400)]
webrtcbin test: Add test for various cases where get_request_pad is meant to fail

This should ensure that the recently added code works.

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

3 years agowebrtcbin: Enforce direction on request sink pad with a specific name
Olivier Crête [Sat, 27 Mar 2021 01:09:04 +0000 (21:09 -0400)]
webrtcbin: Enforce direction on request sink pad with a specific name

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

3 years agowebrtcbin: Try to match an existing transceiver on pad request
Olivier Crête [Sat, 27 Mar 2021 00:55:36 +0000 (20:55 -0400)]
webrtcbin: Try to match an existing transceiver on pad request

This should avoid creating extra transceivers that are duplicated.

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

3 years agowebrtcbin: Validate locked m-lines in set*Description
Olivier Crête [Sat, 27 Mar 2021 00:02:13 +0000 (20:02 -0400)]
webrtcbin: Validate locked m-lines in set*Description

Verify that the remote description match the locked m-lines, otherwise
just reject the SDP.

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

3 years agowebrtcbin: Remove unused session_mid_map
Olivier Crête [Fri, 26 Mar 2021 23:38:57 +0000 (19:38 -0400)]
webrtcbin: Remove unused session_mid_map

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

3 years agowebrtcbin: Enforce m-line restrictions when creating offer
Olivier Crête [Fri, 26 Mar 2021 22:15:50 +0000 (18:15 -0400)]
webrtcbin: Enforce m-line restrictions when creating offer

First fail the offer creation if the mid of an existing offer doesn't
match a forced m-mline.

Then, for all newly added mlines, first look for a transceiver that
forces this m-line, then add a "floating" one, then the data channel.
And repeat this until we're out of transceivers.

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

3 years agowebrtcbin: Remember if a transceiver had a forced m-line
Olivier Crête [Fri, 26 Mar 2021 19:57:15 +0000 (15:57 -0400)]
webrtcbin: Remember if a transceiver had a forced m-line

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

3 years agowebrtcbin: Enforce same-kind on request sink pad with a specific name
Olivier Crête [Fri, 26 Mar 2021 19:54:35 +0000 (15:54 -0400)]
webrtcbin: Enforce same-kind on request sink pad with a specific name

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

3 years agowebrtcbin: Enforce compatible caps on pad request
Olivier Crête [Fri, 26 Mar 2021 19:23:34 +0000 (15:23 -0400)]
webrtcbin: Enforce compatible caps on pad request

If a pad is requested with certain caps and there is already a
transceiver, reject the pad request if the caps don't match.

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

3 years agowebrtcbin: Reject pad request for a specific m-line if it already exists
Olivier Crête [Fri, 26 Mar 2021 19:19:09 +0000 (15:19 -0400)]
webrtcbin: Reject pad request for a specific m-line if it already exists

This way, the app developer is in control.

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

3 years agowebrtcbin: Make request-pad validation an early return
Olivier Crête [Fri, 26 Mar 2021 19:02:50 +0000 (15:02 -0400)]
webrtcbin: Make request-pad validation an early return

This reduces the indendation.

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

3 years agowebrtcbin: Add document for webrtcbin itself to generated doc
Olivier Crête [Fri, 26 Mar 2021 18:48:58 +0000 (14:48 -0400)]
webrtcbin: Add document for webrtcbin itself to generated doc

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

3 years agowebrtcbin test: Test adding a stream to a stream+datachannel
Olivier Crête [Wed, 24 Mar 2021 00:18:24 +0000 (20:18 -0400)]
webrtcbin test: Test adding a stream to a stream+datachannel

This use-case was previously broken by the expectation of having
a 1-1 match between the pad id and the m-line index

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

3 years agowebrtc: Reset received_caps when releasing pad
Olivier Crête [Tue, 23 Mar 2021 23:51:00 +0000 (19:51 -0400)]
webrtc: Reset received_caps when releasing pad

This is to work around a race where the pad is accessed in the
webrtc main thread while being released.

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

3 years agowebrtcbin: Split pad name from mline
Olivier Crête [Tue, 23 Mar 2021 21:51:16 +0000 (17:51 -0400)]
webrtcbin: Split pad name from mline

The simple case where this breaks is if you add a
datachannel and want to add a new pad (a new media) after). Another
case where this is broken is if the order of the media is forced to
something different by the peer.

It's more simple to just split both things completely. In practice, the
pads will be named in the order in which they are allocated, so it
shouldn't change the current behaviour, just enable new ones.

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

3 years agoswitchbin: When collecting srcpad caps, don't intersect with path caps.
Jan Schmidt [Wed, 24 Feb 2021 18:04:00 +0000 (05:04 +1100)]
switchbin: When collecting srcpad caps, don't intersect with path caps.

The path caps describe the input caps that will select each path, don't
intersect those with the srcpad caps, which could be completely
different. Instead, when querying allowed caps for the srcpad, just
construct the union of all possible output caps from all path srcpads.

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

3 years agoswitchbin: Don't report sink pad caps for src pad queries.
Jan Schmidt [Tue, 16 Feb 2021 04:00:07 +0000 (15:00 +1100)]
switchbin: Don't report sink pad caps for src pad queries.

When handling a caps query on the src pad, don't return the union
of input caps. Even when not active, a path element can be queried
for srcpad template caps, or for dropping paths the allowed downstream
caps is anything - as data will be dropped anyway.

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

3 years agogst-plugins: allow per feature registration
Stéphane Cerveau [Thu, 25 Feb 2021 14:22:15 +0000 (15:22 +0100)]
gst-plugins: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

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

3 years agoallow NetStream.Play.PublishNotify Message
Helmut Januschka [Sat, 10 Apr 2021 18:34:26 +0000 (20:34 +0200)]
allow NetStream.Play.PublishNotify Message

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

3 years agoplugins-sys: allow per feature registration
Stéphane Cerveau [Fri, 26 Mar 2021 10:00:50 +0000 (11:00 +0100)]
plugins-sys: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

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

3 years agocodecs: vp9decoder: Update docs
Seungha Yang [Thu, 8 Apr 2021 16:54:50 +0000 (01:54 +0900)]
codecs: vp9decoder: Update docs

* Remove "FIXME 1.20": All the bits are addressed already by using
  vp9parse element
* Fix copy & paste errors: Some comments were copied from h264decoder
  blindly.

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

3 years agocodecs: vp9decoder: Make duplicate_picture() vfunc optional
Seungha Yang [Fri, 9 Apr 2021 03:45:46 +0000 (12:45 +0900)]
codecs: vp9decoder: Make duplicate_picture() vfunc optional

The default implementation was required when superframe parsing
was handled by vp9decoder. For instance, if a superframe consists
of multiple frames with show_existing_frame header, it was vague
that which GstVp9Picture should consume GstVideoCodecFrame.

After 1.18 release, we introduced vp9parse element and
superframe should be handled by upstream vp9parse elemenet now.
So, we don't need to care about the superframe at vp9decoder class
level anymore. Simply, a frame corresponding to show_existing_frame
can be dropped if subclass doesn't implement duplicate_picture().

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

3 years agodebugutils: Add fakeaudiosink element
Philippe Normand [Tue, 30 Mar 2021 13:40:53 +0000 (14:40 +0100)]
debugutils: Add fakeaudiosink element

This element can be useful for CI purposes on machines not running any system
audio daemon. The element implements the GstStreamVolume interface.

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

3 years agov4l2codecs: allocator: Keep dmabuf mapped
Nicolas Dufresne [Thu, 8 Apr 2021 18:53:52 +0000 (14:53 -0400)]
v4l2codecs: allocator: Keep dmabuf mapped

DMABuf allocator already implements DMABuf Sync, meaning that doing
mmap/munmap (unless the mode have changed) is not required. In fact, on
systems with IOMMU it makes the kernel redo the mmu table which is visible
in the CPU usage.

This change reduces CPU usage when decoding
bbb_sunflower_2160p_60fps_normal.mp4 on RK3399 SoC from over 30% to
around 15%.

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

3 years agova: allocator: Implement mem_copy for VA memory.
Víctor Manuel Jáquez Leal [Sat, 3 Apr 2021 12:16:22 +0000 (14:16 +0200)]
va: allocator: Implement mem_copy for VA memory.

Implementation of mem_copy() virtual method for GstVaAllocator.

It's a deep copy where a new VA memory is popped out from the pool or,
if pool is empty, a new memory is allocated. The original memory is
mapped to read, and if its VAImage is not derived and size to copy is
the whole surface, the mapped VAImage of the original memory is put in
the new memory. Otherwise a slow memcpy is done between both memories.

Fixes: #1568
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2136>

3 years agosrtobject: fix optlen of srt_getsockflag
Zhao Zhili [Thu, 8 Apr 2021 12:29:29 +0000 (20:29 +0800)]
srtobject: fix optlen of srt_getsockflag

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

3 years agojpeg2000parse: fix critical log when play one gray colorspace video
Haihua Hu [Thu, 14 Jan 2021 06:24:06 +0000 (14:24 +0800)]
jpeg2000parse: fix critical log when play one gray colorspace video

Need guess color space based on number of components when cannot
got it from sink caps

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

3 years agoldacenc: Emit message on errors
Olivier Crête [Fri, 11 Dec 2020 21:33:39 +0000 (16:33 -0500)]
ldacenc: Emit message on errors

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

3 years agosbc: Return hard error on allocation or mapping error
Olivier Crête [Fri, 11 Dec 2020 21:26:00 +0000 (16:26 -0500)]
sbc: Return hard error on allocation or mapping error

Also post a message on the bus in these cases.wpe: Emit load-progress messages

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

3 years agoTell programmers that set_volume uses linear scale (fixes https://gitlab.freedesktop...
Matthieu De Beule [Sun, 25 Oct 2020 16:39:48 +0000 (16:39 +0000)]
Tell programmers that set_volume uses linear scale (fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1439)

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

3 years agosbc/ldac: Don't use GST_CAPS_NONE to mean NULL
Olivier Crête [Fri, 11 Dec 2020 19:52:20 +0000 (14:52 -0500)]
sbc/ldac: Don't use GST_CAPS_NONE to mean NULL

The GST_CAPS_NONE macro actually returns a instance of
a empty caps.

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

3 years agocodecs: vp9decoder: Allow decoding start with intra-only frame
Seungha Yang [Tue, 30 Mar 2021 08:24:38 +0000 (17:24 +0900)]
codecs: vp9decoder: Allow decoding start with intra-only frame

As per spec "7.2 Uncompressed header semantics" and
"8.2 Frame order constraints", decoding can start with intra-only
frame. This commit is for fixing vp90-2-16-intra-only.webm
bitstream test failure.

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