platform/upstream/gstreamer.git
3 years agova: util: make the _format_changed a common decoder function.
He Junyan [Mon, 21 Sep 2020 04:51:53 +0000 (12:51 +0800)]
va: util: make the _format_changed a common decoder function.

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

3 years agova: h264dec: allocate output buffers according DPB size
Víctor Manuel Jáquez Leal [Thu, 24 Sep 2020 10:36:26 +0000 (12:36 +0200)]
va: h264dec: allocate output buffers according DPB size

Instead of allocating the maximal number of references for output
buffers, this patch reduces the memory foot print in many cases by
just allocating the output buffers required for the DPB.

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

3 years agova: decoder: store output buffer rather than surface
Víctor Manuel Jáquez Leal [Thu, 24 Sep 2020 10:29:49 +0000 (12:29 +0200)]
va: decoder: store output buffer rather than surface

GstVaDecodePicture stored the processed VASurfaceID, under the
assumption that the bufferpool with keep the referenced buffers, but
this approach is fragil.

This patch changes GstVaDecodePicture to store the output buffer,
which already contains its VASurfaceID, and provides a new method to
retrieve the VASurfaceID directly from picture.

Based on He Junyan <junyan.he@intel.com> patches for
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1587

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

3 years agovtdec/vulkan: use Shared storage mode for IOSurface textures
Matthew Waters [Wed, 23 Sep 2020 10:08:46 +0000 (20:08 +1000)]
vtdec/vulkan: use Shared storage mode for IOSurface textures

Fixes a debug assertion with i(Pad)OS 14:

'IOSurface textures must use MTLStorageModeShared'

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

3 years agompegtsmux: Restore intervals when creating TsMux
Jan Alexander Steffens (heftig) [Wed, 23 Sep 2020 15:04:55 +0000 (17:04 +0200)]
mpegtsmux: Restore intervals when creating TsMux

Otherwise the settings from the properties would be overwritten with
the defaults.

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

3 years agova: vpp: global lock to handle shared buffers
Víctor Manuel Jáquez Leal [Sat, 19 Sep 2020 12:26:42 +0000 (14:26 +0200)]
va: vpp: global lock to handle shared buffers

Add a global mutex to exclusive access to shared stream buffers, such
as DMABufs or VASurfaces after a tee:

LIBVA_DRIVER_NAME=iHD \
gst-launch-1.0 v4l2src ! tee name=t t. ! queue ! \
  vapostproc skin-tone=9 ! xvimagesink \
  t. ! queue ! vapostproc ! xvimagesink

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

3 years agova: add vapostproc element
Víctor Manuel Jáquez Leal [Sun, 16 Aug 2020 07:18:11 +0000 (09:18 +0200)]
va: add vapostproc element

Video postprocessor for VA-API

Funcionalities: resize frames, change format, import buffers, apply
filters (such as denoise, sharpen, orientation, if driver offers them).

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

3 years agova: allocator: export composed layer for YUY2 and UYVY
Víctor Manuel Jáquez Leal [Thu, 20 Aug 2020 11:49:33 +0000 (13:49 +0200)]
va: allocator: export composed layer for YUY2 and UYVY

This is a result of an error reported by i965 driver which only can
export composed layer for these formats. This seems to work too with
iHD. These formats are not exposed as native surfaces in Gallium.

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

3 years agova: allocator: add gst_va_dmabuf_buffer_setup()
Víctor Manuel Jáquez Leal [Wed, 19 Aug 2020 14:52:10 +0000 (16:52 +0200)]
va: allocator: add gst_va_dmabuf_buffer_setup()

This function will take an array of DMABuf GstMemory and an array of
fd, and create a VASurfaceID with those fds. Later that VASurfaceID is
attached to each DMABuf through GstVaBufferSurface.

In order to free the surface GstVaBufferSurface now have GstVaDisplay
member, and _buffer_surface_unref() were added.

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

3 years agova: allocator: try to get VASurfaceID from every DMABuf allocator
Víctor Manuel Jáquez Leal [Wed, 19 Aug 2020 14:48:39 +0000 (16:48 +0200)]
va: allocator: try to get VASurfaceID from every DMABuf allocator

Relax the check of the allocator type, because now the qdata can be
attached for other DMABuf allocators.

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

3 years agova: allocator: try to create surface without fourcc but chroma only
Víctor Manuel Jáquez Leal [Sat, 12 Sep 2020 11:10:18 +0000 (13:10 +0200)]
va: allocator: try to create surface without fourcc but chroma only

There are, in VPP, surfaces that doesn't support 4:2:2 fourccs but it
supports the chroma. So this patch gives that opportunity to the
driver.

This patch also simplifiies
gst_va_video_surface_format_from_image_format() to just an iterator
for surfaces available formats.

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

3 years agova: allocator: create surfaces with VASurfaceAttribExternalBuffers
Víctor Manuel Jáquez Leal [Wed, 19 Aug 2020 14:45:49 +0000 (16:45 +0200)]
va: allocator: create surfaces with VASurfaceAttribExternalBuffers

Add a new parameter to _create_surfaces(): a pointer to
VASurfaceAttribExternalBuffers.

If it's defined the memory type is changed to DRM_PRIME, also a new item is
added to the VASurfaceAttrib array with
VASurfaceAttribExternalBufferDescriptor.

Also, the VASurfaceAttrib for pixel format is not mandatory anymore. If fourcc
parameter is 0, is not added in the array, relying on the chroma. This is
useful when creating surfaces for uploading or downloading images.

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

3 years agova: pool: use gst_object_replace() for allocator
Víctor Manuel Jáquez Leal [Thu, 20 Aug 2020 11:46:12 +0000 (13:46 +0200)]
va: pool: use gst_object_replace() for allocator

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

3 years agova: device: use gst_clear_object()
Víctor Manuel Jáquez Leal [Wed, 16 Sep 2020 17:14:30 +0000 (19:14 +0200)]
va: device: use gst_clear_object()

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

3 years agova: caps: expose gst_caps_set_format_array()
Víctor Manuel Jáquez Leal [Tue, 18 Aug 2020 17:12:46 +0000 (19:12 +0200)]
va: caps: expose gst_caps_set_format_array()

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

3 years agova: vah264dec: fix documentation
Víctor Manuel Jáquez Leal [Tue, 22 Sep 2020 17:59:41 +0000 (19:59 +0200)]
va: vah264dec: fix documentation

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

3 years agocodecs: h264: unref leaked caps
Víctor Manuel Jáquez Leal [Wed, 23 Sep 2020 08:58:43 +0000 (10:58 +0200)]
codecs: h264: unref leaked caps

Unref a leaked caps at set_latency().

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

3 years agomsdk: add support for AV1 decoding
Haihao Xiang [Mon, 20 Jul 2020 02:13:13 +0000 (10:13 +0800)]
msdk: add support for AV1 decoding

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

3 years agova: utils: use GstObject for GstVaDisplay in context
Víctor Manuel Jáquez Leal [Sat, 19 Sep 2020 19:43:24 +0000 (21:43 +0200)]
va: utils: use GstObject for GstVaDisplay in context

Thus application could fetch the GstVaDisplay through the sync bus
without knowning the specific implementation, and sharing it or
extract properties.

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

3 years agova: utils: fix code style and wrong log message
Víctor Manuel Jáquez Leal [Sat, 19 Sep 2020 19:36:58 +0000 (21:36 +0200)]
va: utils: fix code style and wrong log message

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

3 years agowpe: Plug event leak
Philippe Normand [Mon, 14 Sep 2020 08:48:48 +0000 (09:48 +0100)]
wpe: Plug event leak

Handled events don't go through the default pad event handler, so they need to
be unreffed in this case.

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

3 years agowpesrc: Don't crash if WPE doesn't generate a buffer.
Jan Schmidt [Mon, 24 Aug 2020 15:57:55 +0000 (01:57 +1000)]
wpesrc: Don't crash if WPE doesn't generate a buffer.

On creating a 2nd wpesrc in a new pipeline in an app that already
has a runnig wpesrc, WPE sometimes doesn't return a buffer on request,
leading to a crash. This commit fixes the crash, but not the underlying
failure - a 2nd wpesrc can still error out instead.

Partially fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1386

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

3 years agowpe: Plug SHM buffer leaks
Philippe Normand [Fri, 11 Sep 2020 11:51:56 +0000 (12:51 +0100)]
wpe: Plug SHM buffer leaks

Fixes #1409

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

3 years agowpe: Move webview load waiting to WPEView
Philippe Normand [Thu, 10 Sep 2020 13:39:58 +0000 (14:39 +0100)]
wpe: Move webview load waiting to WPEView

As waiting for the load to be finished is specific to the WebView, it should be
done from our WPEView, not from the WPEContextThread. This fixes issues where
multiple wpesrc elements are created in sequence. Without this patch the first
view might receive erroneous buffer notifications.

Fixes #1386

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

3 years agoaudiobuffersplit: Add support for specifying output buffer size
Sanchayan Maity [Fri, 11 Sep 2020 12:47:20 +0000 (18:17 +0530)]
audiobuffersplit: Add support for specifying output buffer size

Currently for buffer splitting only output duration can be specified.
Allow specifying a buffer size in bytes for splitting.

Consider a use case of the below pipeline
appsrc ! rptL16pay ! capsfilter ! rtpbin ! udpsink

Maintaining MTU for RTP transfer is desirable but in a scenario
where the buffers being pushed to appsrc do not adhere to this,
an audiobuffersplit element placed between appsrc and rtpL16pay
with output buffer size specified considering the MTU can help
mitigate this.

While rtpL16pay already has a MTU setting, in case of where an
incoming buffer has a size close to MTU, for eg. with a MTU of
1280, a buffer of size 1276 bytes would be split into two buffers,
one of 1268 and other of 8 bytes considering RTP header size of
12 bytes. Putting audiobuffersplit between appsrc and rtpL16pay
can take care of this.

While buffer duration could still be used being able to specify
the size in bytes is helpful here.

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

3 years agowpe: Use proper callback for TLS errors signal handling
Philippe Normand [Thu, 10 Sep 2020 12:05:23 +0000 (13:05 +0100)]
wpe: Use proper callback for TLS errors signal handling

The load-failed and load-failed-with-tls-errors signals expect distinct callback
signatures.

Fixes #1388

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

3 years agova: h264dec: add documentation
Víctor Manuel Jáquez Leal [Sun, 20 Sep 2020 06:31:23 +0000 (08:31 +0200)]
va: h264dec: add documentation

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

3 years agomsdk: enable GPUCopy
Haihao Xiang [Tue, 10 Dec 2019 11:54:43 +0000 (19:54 +0800)]
msdk: enable GPUCopy

Note it works for system memory only

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

3 years agomsdk: call MFXInitEx instead of MFXInit
Haihao Xiang [Tue, 10 Dec 2019 11:47:03 +0000 (19:47 +0800)]
msdk: call MFXInitEx instead of MFXInit

MFXInitEx has more control than MFXInit. The current setting in this
commit is identical to MFXInit

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

3 years agova: decoder: render picture only if data
Víctor Manuel Jáquez Leal [Sat, 19 Sep 2020 12:08:46 +0000 (14:08 +0200)]
va: decoder: render picture only if data

Call vaRenderPicture() only if buffer or slice data is available.

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

3 years agova: decoder: warn if decode fails on a surface
Víctor Manuel Jáquez Leal [Thu, 17 Sep 2020 17:54:28 +0000 (19:54 +0200)]
va: decoder: warn if decode fails on a surface

Instead of logging error if a step fails, it logs a warning message
reducing the noise and obeying the rule for errors since the program
doesn't end

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

3 years agova: h264dec: check is pad has fixed caps at caps query
Víctor Manuel Jáquez Leal [Thu, 17 Sep 2020 17:52:29 +0000 (19:52 +0200)]
va: h264dec: check is pad has fixed caps at caps query

Otherwise it will always reply with the possible driver caps, which
generates problems with Web MSE players.

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

3 years agova: h264dec: Don't need to set pts/dts/duration on outputting frame
Seungha Yang [Fri, 18 Sep 2020 20:39:32 +0000 (05:39 +0900)]
va: h264dec: Don't need to set pts/dts/duration on outputting frame

It will be handled by videodecoder baseclass

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

3 years agowebrtcbin: Accept end-of-candidate pass it to libnice
Olivier Crête [Thu, 26 Mar 2020 00:50:01 +0000 (20:50 -0400)]
webrtcbin: Accept end-of-candidate pass it to libnice

libnice now supports the concept of end-of-candidate, so use the API
for it. This also means that if you don't do that, the webrtcbin will
never declared the connection as failed.

This requires bumping the dependency to libnice 0.1.16

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

3 years agokmssink: Do not source using padded width/height
Nicolas Dufresne [Thu, 17 Sep 2020 21:39:25 +0000 (17:39 -0400)]
kmssink: Do not source using padded width/height

The width/height from the video meta can be padded width, height. But when
sourcing from padded buffer, we only want to use the valid pixels. This
rectangle is from the crop meta, orther it is deduces from the caps. The width
and height from the caps is save in the parent class, use these instead of the
GstVideoInfo when settting the src rectangle.

This fixes an issue with 1080p video displaying repeated or green at the
padded bottom 8 lines (seen with v4l2codecs).

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

3 years agod3d11: Add support for packed 8bits 4:2:2 YUV formats
Seungha Yang [Thu, 17 Sep 2020 16:41:35 +0000 (01:41 +0900)]
d3d11: Add support for packed 8bits 4:2:2 YUV formats

Note that newly added formats (YUY2, UYVY, and VYUY) are not supported
render target view formats. So such formats can be only input of d3d11convert
or d3d11videosink. Another note is that YUY2 format is a very common
format for hardware en/decoders on Windows.

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

3 years agowebrtcbin: Merge the RTX SSRCs from all transceivers when bundling
Olivier Crête [Wed, 26 Aug 2020 21:48:06 +0000 (17:48 -0400)]
webrtcbin: Merge the RTX SSRCs from all transceivers when bundling

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

3 years agoavtp: avtpaafdepay: fix crash when building caps
Marian Cichy [Tue, 15 Sep 2020 15:09:57 +0000 (17:09 +0200)]
avtp: avtpaafdepay: fix crash when building caps

gst_caps_new_simple gets wrong types for rate and channel which
may lead to a crash.

As 64-bit values for rate, depth, format, channels does not
make much sense and since any other functionality in gstreamer
expects G_TYPE_INT for channels and rate, we should stick to that

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

3 years agoh265parse: recognize more HEVC extension streams
Haihao Xiang [Tue, 9 Jun 2020 02:10:12 +0000 (10:10 +0800)]
h265parse: recognize more HEVC extension streams

There are streams which have the right general_profile_idc and
general_profile_compatibility_flag, but don't have the right extension
flags. We may try to use chroma_format_idc and bit_depth to
recognize these streams.

e.g.
https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/SCC/IBF_Disabled_A_MediaTek_2.zip

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

3 years agoh265parser: select the right profile for high throughput SCC stream
Haihao Xiang [Fri, 5 Jun 2020 05:01:06 +0000 (13:01 +0800)]
h265parser: select the right profile for high throughput SCC stream

Currently screen-extended-high-throughput-444 is recognized as
screen-extended-main-444, screen-extended-high-throughput-444-10 is
recognized as screen-extended-main-444-10 because they have the same
extension flags, so without this patch, it is possible that a decoder
which supports SCC but doesn't support throughput SCC will try to decode
a throughput SCC stream.

e.g.
https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/SCC/HT_A_SCC_Apple_2.zip

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

3 years agomsdk: vpp: fixup passthrough checking for DMA
Randy Li (ayaka) [Tue, 8 Sep 2020 06:43:49 +0000 (14:43 +0800)]
msdk: vpp: fixup passthrough checking for DMA

I think it is just a typo from e1a90f1ec9
msdkvpp: Disable passthrough if memory capsfeature changes

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

3 years agowaylandsink: Use memfd_create() when available
Emmanuel Gil Peyrot [Tue, 15 Sep 2020 15:51:51 +0000 (17:51 +0200)]
waylandsink: Use memfd_create() when available

This (so-far) Linux- and FreeBSD-only API lets users create file
descriptors purely in memory, without any backing file on the filesystem
and the race condition which could ensue when unlink()ing it.

It also allows seals to be placed on the file, ensuring to every other
process that we won’t be allowed to shrink the contents, potentially
causing a SIGBUS when they try reading it.

This patch is best viewed with the -w option of git log -p.

It is an almost exact copy of Wayland commit
6908c8c85a2e33e5654f64a55cd4f847bf385cae, see
https://gitlab.freedesktop.org/wayland/wayland/merge_requests/4

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

3 years agocodecs: vp9decoder: Relying on upstream vp9parse for super frame handling
Seungha Yang [Thu, 10 Sep 2020 12:19:43 +0000 (21:19 +0900)]
codecs: vp9decoder: Relying on upstream vp9parse for super frame handling

By this way, we can simplify the decoding flow. Moreover, we don't
need to worry about the case where multiple visible-frames are
composed in one super-frame, since upstream vp9parse will split
them per frame unit.

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

3 years agocodecs: vp9decoder: Remove unused pts variable
Seungha Yang [Thu, 10 Sep 2020 12:42:49 +0000 (21:42 +0900)]
codecs: vp9decoder: Remove unused pts variable

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

3 years agod3d11vp9dec: Don't need to consider output_picture() call without GstVideoCodecFrame
Seungha Yang [Fri, 11 Sep 2020 15:12:03 +0000 (00:12 +0900)]
d3d11vp9dec: Don't need to consider output_picture() call without GstVideoCodecFrame

Baseclass will be updated in order to ensure GstVideoCodecFrame.

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

3 years agod3d11vp9dec: Specify profile and alignment on sink template
Seungha Yang [Thu, 10 Sep 2020 11:32:13 +0000 (20:32 +0900)]
d3d11vp9dec: Specify profile and alignment on sink template

Set supported profile(s) on sink template caps, so that decodebin
can filter out this element if profile of given vp9 stream is not
supported by hardware decoder.

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

3 years agod3d11decoder: Cleanup code
Seungha Yang [Thu, 10 Sep 2020 12:31:38 +0000 (21:31 +0900)]
d3d11decoder: Cleanup code

* Don't need to set pts/dts/duration on output buffer of frame.
  it's handled by baseclass
* Remove meaningless debug output

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

3 years agocodecs: h264decoder: Calculate and set latency
Víctor Manuel Jáquez Leal [Sat, 22 Aug 2020 10:44:16 +0000 (12:44 +0200)]
codecs: h264decoder: Calculate and set latency

Add gst_h264_decoder_set_latency(), which calculates and sets
latency on base decoder class, after new_sequence is called.

This assumes that in new_sequence() vmethod, callee negotiates
downstream caps.

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

3 years agoRevert "va: h264dec: set latency"
Víctor Manuel Jáquez Leal [Sat, 22 Aug 2020 10:47:23 +0000 (12:47 +0200)]
Revert "va: h264dec: set latency"

This reverts commit 3aedef4c8601dcafb065d8095a927f1cd528056f.

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

3 years agovalidate: plug leak in gssdp
Jordan Petridis [Mon, 14 Sep 2020 11:42:36 +0000 (14:42 +0300)]
validate: plug leak in gssdp

These are triggered by the webrtcbin tests

https://gitlab.gnome.org/GNOME/gssdp/-/issues/10

3 years agotsdemux: Parse Audio Preselection Descriptor
yychao [Fri, 4 Sep 2020 15:34:16 +0000 (23:34 +0800)]
tsdemux: Parse Audio Preselection Descriptor

For Dolby AC4 audio experience, parsing PMTs/APD from transport stream layer for all available presentations.
Refer to ETSI EN 300 468 V1.16.1 (2019-05)

1. 6.4.1 Audio preselection descriptor
2. Table M.1: Mapping of codec specific values to the audio preselection descriptor

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

3 years agotsdemux: Add new API for fetching extended descriptors
yychao [Fri, 4 Sep 2020 15:28:58 +0000 (23:28 +0800)]
tsdemux: Add new API for fetching extended descriptors

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

3 years agowebrtc: propagate more errors through the promise
Matthew Waters [Wed, 26 Aug 2020 05:45:35 +0000 (15:45 +1000)]
webrtc: propagate more errors through the promise

Return errors on promises when things fail where available.

Things like parsing errors, invalid states, missing fields, unsupported
transitions, etc.

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

3 years agomeson: Do not warn when a windowing system is not found
Nirbheek Chauhan [Wed, 1 Jul 2020 02:05:08 +0000 (07:35 +0530)]
meson: Do not warn when a windowing system is not found

Error out when the vulkan option is enabled, and just print
a message() otherwise. This is more correct and also allows us to pass
--fatal-meson-warnings more reliably.

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

3 years agoopencv: set opencv_dep when option is disabled (#1406)
Adam Williamson [Thu, 10 Sep 2020 17:35:11 +0000 (10:35 -0700)]
opencv: set opencv_dep when option is disabled (#1406)

The examples build file checks opencv_dep, so it still needs to
be set even if the option is disabled.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1406

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1570>

3 years agoopenh264dec: port to new request_sync_point() API
Mathieu Duponchelle [Thu, 10 Sep 2020 21:12:10 +0000 (23:12 +0200)]
openh264dec: port to new request_sync_point() API

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

3 years agoh264decoder: Fix various typos
Nicolas Dufresne [Tue, 28 Jul 2020 22:32:03 +0000 (18:32 -0400)]
h264decoder: Fix various typos

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

3 years agov4l2slh264dec: Minor cleanup
Nicolas Dufresne [Tue, 28 Jul 2020 22:39:52 +0000 (18:39 -0400)]
v4l2slh264dec: Minor cleanup

Move few variables in their respective scope.

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

3 years agov4l2slh264dec: Fix B-Frame weight table
Nicolas Dufresne [Wed, 22 Jul 2020 19:40:14 +0000 (15:40 -0400)]
v4l2slh264dec: Fix B-Frame weight table

We where not setting the luma l1 weight table.

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

3 years agovideoparsers: Add vp9parse element
Seungha Yang [Wed, 9 Sep 2020 12:38:33 +0000 (21:38 +0900)]
videoparsers: Add vp9parse element

Adding vp9parse element to parse various stream information such as
resolution, profile, and so on. If upstream does not provide resolution and/or
profile, this would be useful for decodebin pipeline for autoplugging
suitable decoder element depending on template caps of each decoder element.

In addition, vp9parse element supports unpacking superframe into
single frame for decoders. The vp9 superframe is a frame which consists
of multiple frames (or superframe with one frame is allowed) followed by superframe
index block. Then unpacked each frame will be considered as normal frame
by decoder. The decision for unpacking will be done by downstream element's
"alignment" caps field, which can be "super-frame" or "frame".
If downstream specifies the "alignment" as "frame",
then vp9parse element will split an incoming superframe into single frames
and the superframe index (located at the end of the superframe) data
will be discarded by vp9parse element.

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

3 years agomfvideosrc: Set timestamp on buffer when it's captured
Seungha Yang [Tue, 16 Jun 2020 12:09:36 +0000 (21:09 +0900)]
mfvideosrc: Set timestamp on buffer when it's captured

Capture the timestamp immediately when new frame is arrived,
instead of doing that on ::create() method. There would be
time gap between captured time and outputting time.

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

3 years agoline21enc: add remove-caption-meta property
Mathieu Duponchelle [Fri, 4 Sep 2020 14:53:03 +0000 (16:53 +0200)]
line21enc: add remove-caption-meta property

Similar to #GstCCExtractor:remove-caption-meta

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

3 years agoline21enc: heavily constrain video height
Mathieu Duponchelle [Fri, 4 Sep 2020 00:38:58 +0000 (02:38 +0200)]
line21enc: heavily constrain video height

We can only determine a correct placement for the CC line
with:

* height == 525 (standard NTSC, line 21 / 22)
* height == 486 (NTSC usable lines + 6 lines for VBI, line 1 / 2)

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

3 years agoline21enc: add support for CDP closed caption meta
Mathieu Duponchelle [Fri, 4 Sep 2020 00:33:52 +0000 (02:33 +0200)]
line21enc: add support for CDP closed caption meta

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

3 years agoadaptivedemux: Add another nominal bitrate fallback calculation
Edward Hervey [Thu, 27 Aug 2020 09:23:01 +0000 (11:23 +0200)]
adaptivedemux: Add another nominal bitrate fallback calculation

Some HTTP servers don't provide fragment sizes (with the Content-Length HTTP
header). In order to still figure out a nominal bitrate (for usage by queue2),
calculate on when we're done downloading a fragment.

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

3 years agoadaptivedemux: Handle invalid HTTP duration
Edward Hervey [Thu, 27 Aug 2020 09:18:56 +0000 (11:18 +0200)]
adaptivedemux: Handle invalid HTTP duration

The default BYTE DURATION basesrc query handler will return `-1` and TRUE. In
order to properly handle cases where upstream http servers didn't return a valid
Content-Length we also need to check whether it was valid when calculating
bitrates.

Avoids returning completely bogus bitrates with gogol's video streaming services

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

3 years agomfvideoenc: Add support for zero-copy encoding
Seungha Yang [Wed, 12 Aug 2020 11:31:32 +0000 (20:31 +0900)]
mfvideoenc: Add support for zero-copy encoding

Add custom IMFMediaBuffer and IMF2DBuffer implementation in order to
keep track of lifecycle of Media Foundation memory object.
By this new implementation, we can pass raw memory of upstream buffer
to Media Foundation without copy.

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

3 years agortmp2: Replace stats queue with stats lock
Jan Alexander Steffens (heftig) [Tue, 1 Sep 2020 11:28:44 +0000 (13:28 +0200)]
rtmp2: Replace stats queue with stats lock

Making the thread receiving the stats wait on the loop to respond was
not a good idea, as the latter can get blocked on the streaming thread.

Have get_stats read the values directly, adding a lock to ensure we
don't read garbage.

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

3 years agortmp2sink: add docs section with since marker on new stop-commands property
Nazar Mokrynskyi [Wed, 19 Aug 2020 11:51:17 +0000 (14:51 +0300)]
rtmp2sink: add docs section with since marker on new stop-commands property

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

3 years agortmp2: fix code style, update documentation cache
Nazar Mokrynskyi [Tue, 18 Aug 2020 16:16:40 +0000 (19:16 +0300)]
rtmp2: fix code style, update documentation cache

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

3 years agortmp2: Clean up (improve) GstRtmpStopCommands type
Jan Alexander Steffens (heftig) [Tue, 18 Aug 2020 12:05:26 +0000 (14:05 +0200)]
rtmp2: Clean up (improve) GstRtmpStopCommands type

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

3 years agortmp2sink: handle EOS event and close stream
Nazar Mokrynskyi [Sat, 2 May 2020 01:49:42 +0000 (04:49 +0300)]
rtmp2sink: handle EOS event and close stream

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1285

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

3 years agompegtsmux: Make handling of sinkpads thread-safe
Jan Alexander Steffens (heftig) [Wed, 2 Sep 2020 13:29:49 +0000 (15:29 +0200)]
mpegtsmux: Make handling of sinkpads thread-safe

Ensure we take the object lock while accessing `GstElement.sinkpads`.
Use an iterator when the code isn't simple to avoid deadlock.

When we find the best pad, take a reference so a concurrent pad
release doesn't destroy the pad before we're done with it.

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

3 years agohlssink2: Actually release splitmuxsink's pads
Jan Alexander Steffens (heftig) [Tue, 1 Sep 2020 11:29:30 +0000 (13:29 +0200)]
hlssink2: Actually release splitmuxsink's pads

It was looking at the "outer" peer of the ghost pad, not the "inner"
peer (the target).

It provided the wrong pad to gst_element_release_request_pad.

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

3 years agompegtsmux: Don't create streams with reserved PID
Edward Hervey [Tue, 8 Sep 2020 08:48:56 +0000 (10:48 +0200)]
mpegtsmux: Don't create streams with reserved PID

There are quite a few reserved PID in the various MPEG-TS (and derivate)
specifications which we should definitely not use. Those PID have a certain
meaning and purpose.

Furthermore, a lot of the code in the muxer implementation also makes assumption
on the purpose of streams based on their PID.

Therefore, when requesting a pad with a specific PID, make sure it is not a
restricted PID.

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

3 years agoci: include template from gst-ci master branch again
Tim-Philipp Müller [Tue, 8 Sep 2020 16:30:42 +0000 (17:30 +0100)]
ci: include template from gst-ci master branch again

3 years agoBack to development
Tim-Philipp Müller [Tue, 8 Sep 2020 15:58:50 +0000 (16:58 +0100)]
Back to development

3 years agoRelease 1.18.0
Tim-Philipp Müller [Mon, 7 Sep 2020 23:07:45 +0000 (00:07 +0100)]
Release 1.18.0

3 years agomeson: dist pot file in tarball
Tim-Philipp Müller [Mon, 7 Sep 2020 21:48:27 +0000 (22:48 +0100)]
meson: dist pot file in tarball

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

3 years agogst: Update for gst_video_transfer_function_*() function renaming
Sebastian Dröge [Mon, 7 Sep 2020 09:14:47 +0000 (12:14 +0300)]
gst: Update for gst_video_transfer_function_*() function renaming

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

3 years agotests: mpegtsmux: Test that we can manipulate pads after stop
Jan Alexander Steffens (heftig) [Tue, 1 Sep 2020 13:05:07 +0000 (15:05 +0200)]
tests: mpegtsmux: Test that we can manipulate pads after stop

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

3 years agompegtsmux: Keep mux usable after stop
Jan Alexander Steffens (heftig) [Tue, 1 Sep 2020 12:56:55 +0000 (14:56 +0200)]
mpegtsmux: Keep mux usable after stop

Otherwise you cannot request new pads until after it is started again.

gst_base_ts_mux_reset with FALSE is still called in the dispose
implementation, so the muxer still gets deallocated when we actually
clean up.

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

3 years agomsdkvp9dec: change the include header order
Haihao Xiang [Tue, 1 Sep 2020 05:32:44 +0000 (13:32 +0800)]
msdkvp9dec: change the include header order

This fixes the compiler error when MFX_VERSION_USE_LATEST is defined in
the SDK.

/usr/include/mfx/mfxvp9.h:48:5: error: unknown type name ‘mfxExtBuffer’
     mfxExtBuffer Header;

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

3 years agortmp2: Need to unescape the userinfo before setting
Nirbheek Chauhan [Fri, 28 Aug 2020 21:12:12 +0000 (02:42 +0530)]
rtmp2: Need to unescape the userinfo before setting

This regressed in 827afa206d8c9675f2a7af402396552c2ed1df09. The same
fix was also committed to the webrtc element, but rtmp2 was missed.

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

3 years agowebrtc: Clean up the userinfo unescaping code
Nirbheek Chauhan [Fri, 28 Aug 2020 21:10:44 +0000 (02:40 +0530)]
webrtc: Clean up the userinfo unescaping code

Continuation from 04fd705906f4bd4cf1901001484e60c21e1b3139. This is
easier to understand and also avoids two copies.

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

3 years agodshowsrcwrapper: Update build instructions. Add _builddir to include search path.
Jérôme Laheurte [Tue, 25 Aug 2020 08:04:53 +0000 (10:04 +0200)]
dshowsrcwrapper: Update build instructions. Add _builddir to include search path.

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

3 years agomodplug: avoid division by zero
Jonathan Matthew [Thu, 27 Aug 2020 21:53:26 +0000 (07:53 +1000)]
modplug: avoid division by zero

Under some conditions, GetMaxPosition() returns zero, which should cause
position queries to fail rather than crash.

3 years agowebrtc: Unescape turnserver user and password
trilene [Fri, 21 Aug 2020 22:40:59 +0000 (18:40 -0400)]
webrtc: Unescape turnserver user and password

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

3 years agomeson: allow the user to disable opencv
Fabrice Fontaine [Sat, 22 Aug 2020 21:33:48 +0000 (23:33 +0200)]
meson: allow the user to disable opencv

Allow the user to really disable opencv through meson (i.e.
-Dopencv=disabled).

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

3 years agosctp: usrsctp: increase DIAG_MSG_LEN to accomodate longer file path
Tim-Philipp Müller [Tue, 25 Aug 2020 22:46:16 +0000 (23:46 +0100)]
sctp: usrsctp: increase DIAG_MSG_LEN to accomodate longer file path

Fixes "‘%s’ directive output truncated writing XX bytes into
a region of size NN [-Wformat-truncation=]" compiler warnings.

https://github.com/sctplab/usrsctp/pull/521

Fixes #1389

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

3 years agodshowsrcwrapper: fix typo in variable name
Jérôme Laheurte [Tue, 25 Aug 2020 08:49:11 +0000 (10:49 +0200)]
dshowsrcwrapper: fix typo in variable name

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

3 years agovulkan: fix the enumtypes install path
Wim Taymans [Fri, 21 Aug 2020 14:28:42 +0000 (16:28 +0200)]
vulkan: fix the enumtypes install path

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

3 years agowpe: skip glbasesrc decide_allocation when non-GL caps are negotiated
Philippe Normand [Sat, 22 Aug 2020 13:38:38 +0000 (14:38 +0100)]
wpe: skip glbasesrc decide_allocation when non-GL caps are negotiated

Checking for GL caps features in gl_start() was done too late in case the parent
class fails to setup a working GL context. The element now determines if GL
support should be enabled during the decide-allocation query handling.

Additionally, when no GL context was found, we need to handle the element
cleanup because in that situation glbasesrc won't call gl_stop.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1376

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

3 years agocodecs: h264decoder: Fix possible GstH264Picture leak and small cleanup
Seungha Yang [Fri, 21 Aug 2020 13:48:48 +0000 (22:48 +0900)]
codecs: h264decoder: Fix possible GstH264Picture leak and small cleanup

Don't leak pictures when dpb is full unexpectedly.

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

3 years agod3d11videosink: Fix crash caused by missing null termination
Seungha Yang [Thu, 20 Aug 2020 17:36:13 +0000 (02:36 +0900)]
d3d11videosink: Fix crash caused by missing null termination

gst_caps_features_new() must be null terminated.

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

3 years agova: allocator: remove parameter from _create_buffer_surface()
Víctor Manuel Jáquez Leal [Wed, 19 Aug 2020 14:50:46 +0000 (16:50 +0200)]
va: allocator: remove parameter from _create_buffer_surface()

Don't the allocator to _create_buffer_surface() since it's not used.

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

3 years agova: utils: free allocated string
Víctor Manuel Jáquez Leal [Wed, 19 Aug 2020 15:18:26 +0000 (17:18 +0200)]
va: utils: free allocated string

and fix a memleak

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

3 years agova: utils: fix log category initialization
Víctor Manuel Jáquez Leal [Tue, 18 Aug 2020 07:05:00 +0000 (09:05 +0200)]
va: utils: fix log category initialization

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

3 years agova: h264dec: check va allocator at decide allocation
Víctor Manuel Jáquez Leal [Tue, 18 Aug 2020 09:39:46 +0000 (11:39 +0200)]
va: h264dec: check va allocator at decide allocation

And some code cleanups

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

3 years agova: decoder: improve locks for member variable access
Víctor Manuel Jáquez Leal [Tue, 18 Aug 2020 09:38:46 +0000 (11:38 +0200)]
va: decoder: improve locks for member variable access

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