platform/upstream/gstreamer.git
4 years agovulkan/physical-device: dump some more information to logs
Matthew Waters [Sat, 13 Jun 2020 07:40:02 +0000 (17:40 +1000)]
vulkan/physical-device: dump some more information to logs

Also dump the Vulkan 1.1 and Vulkan 1.2 device properties/features
where supported.

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

4 years agovulkan/instance: add vulkan API version selection and checking
Matthew Waters [Sat, 13 Jun 2020 07:31:07 +0000 (17:31 +1000)]
vulkan/instance: add vulkan API version selection and checking

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

4 years agovulkan/wayland: initialise debug category before debug logging
Matthew Waters [Sat, 13 Jun 2020 07:29:57 +0000 (17:29 +1000)]
vulkan/wayland: initialise debug category before debug logging

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

4 years agonalutils: Improve slightly the error trace
Nicolas Dufresne [Fri, 19 Jun 2020 16:15:53 +0000 (12:15 -0400)]
nalutils: Improve slightly the error trace

Until now, bound check would simply trace the values and the range. This
enhances the trace by also tracing the name of the variable that was to be set
or read. This is not magically perfect in all cases, but greatly speed the
debugging work. Here's an example before and after this change:

Before: gst_h264_parser_parse_slice_hdr: value not in allowed range. value: 819183, range -87-77
After:  gst_h264_parser_parse_slice_hdr: value for 'slice->slice_qp_delta' not in allowed range. value: 819183, range -87-77
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1356>

4 years agoRevert "errorignore: Added convert-error signal"
Jan Alexander Steffens (heftig) [Thu, 12 Dec 2019 11:58:24 +0000 (12:58 +0100)]
Revert "errorignore: Added convert-error signal"

The introduced API has [some problems][1] and [a better solution][2] was
found that made the feature obsolete.

This reverts commit f7626c1f2ac14a34991723df6c28f54af38fcbc4.

[1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/736#note_357702
[2]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/736#note_238830

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/916

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

4 years agoBack to development
Tim-Philipp Müller [Fri, 19 Jun 2020 23:28:22 +0000 (00:28 +0100)]
Back to development

4 years agoRelease 1.17.1
Tim-Philipp Müller [Fri, 19 Jun 2020 18:22:18 +0000 (19:22 +0100)]
Release 1.17.1

4 years agosrt: add "empty" subclasses for deprecated srt{client,server}{src,sink}
Tim-Philipp Müller [Fri, 19 Jun 2020 16:20:02 +0000 (17:20 +0100)]
srt: add "empty" subclasses for deprecated srt{client,server}{src,sink}

The doc system gets confused when we register the exact same
class as multiple elements, so make a subclass for each.

Also wrap registration of deprecated elements with #ifndef GST_REMOVE_DEPRECATED.

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

4 years agox265: ignore tune property when diffing generated docs
Tim-Philipp Müller [Fri, 19 Jun 2020 14:31:04 +0000 (15:31 +0100)]
x265: ignore tune property when diffing generated docs

Unfortunately it means those tune enums don't show up in
the docs then, but if that's how it's gotta be..

(Problem at hand is that on Tim's machine x265enc gets an
tune=animation and on the CI machine this doesn't show up.)

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

4 years agodocs: update plugins cache
Tim-Philipp Müller [Fri, 19 Jun 2020 12:08:10 +0000 (13:08 +0100)]
docs: update plugins cache

Add some more plugins, update for new markers.

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

4 years agoMark more plugin GTypes as plugin API
Tim-Philipp Müller [Fri, 19 Jun 2020 12:05:38 +0000 (13:05 +0100)]
Mark more plugin GTypes as plugin API

To appease the CI gods.

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

4 years agogst-project-maker: use $0 for the program name in usage and help text
Antonio Ospite [Wed, 17 Jun 2020 07:31:09 +0000 (09:31 +0200)]
gst-project-maker: use $0 for the program name in usage and help text

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

4 years agogst-project-maker: set up a meson project instead of an autotools one
Antonio Ospite [Fri, 17 Jan 2020 16:49:47 +0000 (17:49 +0100)]
gst-project-maker: set up a meson project instead of an autotools one

Now that autotools has been removed generate a meson project template in
gst-project-maker.

There are some differences with the autotools project

  1. gstreamer-controller-1.0 is not added to the default dependencies.
  2. The '-Wall' option is not set explicitly, meson can handle that.
  3. The flags in GST_PLUGIN_LDFLAGS have not been ported to meson as
     they are not necessary anymore.

The generated project requires meson 0.53.0 for the 'fs' module. It's up
to the user to remove that part in case compatibility with older
versions of meson is desired.

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

4 years agogst-project-maker: fix comment referring to plug-in instead of program
Antonio Ospite [Fri, 1 Feb 2019 16:05:23 +0000 (17:05 +0100)]
gst-project-maker: fix comment referring to plug-in instead of program

Fix the comment in $basedir/tools/Makefile.am which wrongly refers to
plug-in while the file in tool/ is about the executable program.

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

4 years agogst-app-maker: fix program name and arguments in usage text and help text
Antonio Ospite [Fri, 1 Feb 2019 16:04:19 +0000 (17:04 +0100)]
gst-app-maker: fix program name and arguments in usage text and help text

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

4 years agomfvideosrc: Add support for jpeg on Win32 application
Seungha Yang [Mon, 15 Jun 2020 15:12:03 +0000 (00:12 +0900)]
mfvideosrc: Add support for jpeg on Win32 application

Enable reading jpeg data from webcam if it's supported.
Note that this would be enabled only for Win32.
For UWP, we need to research more about how to support jpeg.

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

4 years agomfvideosrc: Fix wrong casting
Seungha Yang [Mon, 15 Jun 2020 15:11:03 +0000 (00:11 +0900)]
mfvideosrc: Fix wrong casting

Don't cast ISoftwareBitmap to IMFMediaBuffer

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

4 years agomfvideosrc: Add support YUY2 format for UWP
Seungha Yang [Sat, 13 Jun 2020 19:12:42 +0000 (04:12 +0900)]
mfvideosrc: Add support YUY2 format for UWP

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

4 years agomediafoundation: Drop IMFCaptureEngine implementation
Seungha Yang [Sat, 13 Jun 2020 18:13:04 +0000 (03:13 +0900)]
mediafoundation: Drop IMFCaptureEngine implementation

It was introduced for later use of its enhanced feature over IMFSourceReader
such as taking photo with video preview, audio/video capturing at
the same time, etc. But currently it's not our use case, and it would
be maintenance burden.

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

4 years agomssdemux: ignore unrecognized stream
Hosang Lee [Wed, 17 Jun 2020 01:57:00 +0000 (10:57 +0900)]
mssdemux: ignore unrecognized stream

Only create pads for steams with caps that can be recognized
from the fourcc.

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

4 years agodvbsubenc: Add DVB Subtitle encoder
Jan Schmidt [Tue, 7 Apr 2020 11:47:22 +0000 (21:47 +1000)]
dvbsubenc: Add DVB Subtitle encoder

Add an element that converts AYUV video frames to a DVB
subpicture stream.

It's fairly simple for now. Later it would be good to support
input via a stream that contains only GstVideoOverlayComposition
meta.

The element searches each input video frame for the largest
sub-region containing non-transparent pixels and encodes that
as a single DVB subpicture region. It can also do palette
reduction of the input frames using code taken from
libimagequant.

There are various FIXME for potential improvements for now, but
it works.

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

4 years agod3d11: Don't assume response of context query has valid d3d11 device context
Seungha Yang [Tue, 16 Jun 2020 10:26:13 +0000 (19:26 +0900)]
d3d11: Don't assume response of context query has valid d3d11 device context

Peer elements should return FALSE if d3d11 device context is unavailable
but it might happen for some reason (e.g., wrong implementation or so)

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

4 years agod3d11decoder: Disable zero-copy for blacklisted device
Seungha Yang [Mon, 15 Jun 2020 12:10:09 +0000 (21:10 +0900)]
d3d11decoder: Disable zero-copy for blacklisted device

Should enable it for verified devices. For now, Xbox is blacklisted

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

4 years agod3d11decoder: Adjust alignment constraint for Xbox device
Seungha Yang [Fri, 12 Jun 2020 11:34:49 +0000 (20:34 +0900)]
d3d11decoder: Adjust alignment constraint for Xbox device

XBox doesn't seem to support 128 bytes alignment for 4K HEVC

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

4 years agod3d11window: Do not configure video processor for Xbox device
Seungha Yang [Fri, 12 Jun 2020 11:18:53 +0000 (20:18 +0900)]
d3d11window: Do not configure video processor for Xbox device

Disable video processor for Xbox until it's verified

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

4 years agod3d11utils: Add a helper method for checking Xbox device
Seungha Yang [Fri, 12 Jun 2020 10:07:07 +0000 (19:07 +0900)]
d3d11utils: Add a helper method for checking Xbox device

Required for some cases to work around device specific issue

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

4 years agod3d11videosink: Use GPU memory copy if possible
Seungha Yang [Fri, 12 Jun 2020 11:11:29 +0000 (20:11 +0900)]
d3d11videosink: Use GPU memory copy if possible

Even if fallback buffer is required (e.g., shader resource view is unavailable),
use direct GPU memory copy if possible. It must be much faster than
system memory copy approach.

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

4 years agod3d11videosink: Ensure shader resource view of fallback buffer
Seungha Yang [Fri, 12 Jun 2020 10:44:01 +0000 (19:44 +0900)]
d3d11videosink: Ensure shader resource view of fallback buffer

SRV must be configured for color conversion

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

4 years agod3d11window: Fix typo "configureed"
Seungha Yang [Fri, 12 Jun 2020 10:08:34 +0000 (19:08 +0900)]
d3d11window: Fix typo "configureed"

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

4 years agowinscreencap: Add dxgiscreencapsrc element.
Jun-ichi OKADA [Thu, 21 Nov 2019 04:50:21 +0000 (13:50 +0900)]
winscreencap: Add dxgiscreencapsrc element.

This element uses the Desktop Duplication API to capture the desktop screen at high speed.
It supports Windows 8 or later.

It has the following features compared to other elements:
 * Runs faster.
 * It works in High DPI environment.
 * Draws an accurate mouse cursor.

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

4 years agomsdkdec: hold a reference for the surfaces locked by msdk
Xu Guangxin [Thu, 14 May 2020 03:03:49 +0000 (11:03 +0800)]
msdkdec: hold a reference for the surfaces locked by msdk

previous code releases GstBuffer too earlier. so we will see

ERROR                default gstmsdkvideomemory.c:77:gst_msdk_video_allocator_get_surface: failed to get surface available
ERROR         msdkbufferpool gstmsdkbufferpool.c:270:gst_msdk_buffer_pool_alloc_buffer:<msdkbufferpool0> failed to create new MSDK memory

We need to hold GstBuffer reference for msdk if the surfaced locked by msdk.

step to reproduce.
1. ffmpeg -f lavfi -i testsrc=duration=10:size=320x240:rate=30 -pix_fmt yuv420p -c:v libx265 test.265
2. GST_GL_PLATFORM=egl  gst-launch-1.0 -v filesrc location=test.265  ! h265parse ! msdkh265dec  ! queue ! glimagesink

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

4 years agovulkan/shaders: add explicit license headers
Matthew Waters [Fri, 12 Jun 2020 05:48:14 +0000 (15:48 +1000)]
vulkan/shaders: add explicit license headers

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

4 years agovulkan/shaders: manually indent bin2array
Matthew Waters [Fri, 12 Jun 2020 05:47:01 +0000 (15:47 +1000)]
vulkan/shaders: manually indent bin2array

Looks much nicer with some semblance of code formatting

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

4 years agocodecs: h265picture: Don't leak pic_list GArray
Seungha Yang [Thu, 11 Jun 2020 19:59:47 +0000 (04:59 +0900)]
codecs: h265picture: Don't leak pic_list GArray

Equivalent to the commit 7b8c071f9c4a675f6b53e373c346d9e1f866f818

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

4 years agoyadif: remove plugin, there's now deinterlace method=yadif
Tim-Philipp Müller [Thu, 11 Jun 2020 18:35:29 +0000 (19:35 +0100)]
yadif: remove plugin, there's now deinterlace method=yadif

Plugin code was still the GPL version, and the
functionality has now been moved into the deinterlace
element in gst-plugins-good as method=yadif (and LGPL).

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/444
and https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/621

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/216
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/463

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

4 years agowasapi2: Fallback to IAudioClient interface if IAudioClient3 API is unavailable
Seungha Yang [Wed, 10 Jun 2020 16:47:14 +0000 (01:47 +0900)]
wasapi2: Fallback to IAudioClient interface if IAudioClient3 API is unavailable

When default device is selected, IAudioClient3 API doesn't look like
available.

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

4 years agointerlace: Fix crash with empty caps in setcaps
Vivia Nikolaidou [Thu, 11 Jun 2020 10:50:38 +0000 (13:50 +0300)]
interlace: Fix crash with empty caps in setcaps

If the src_peer_caps are EMPTY (e.g. negotiation failed somewhere), the
assertion inside gst_video_info_from_caps would fail and the whole
pipeline would crash. Check for gst_caps_is_empty before
gst_video_info_from_caps and gracefully fail if it's empty.

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

4 years agowasapi: Fix possible deadlock while downwards state change
Seungha Yang [Tue, 9 Jun 2020 13:38:28 +0000 (22:38 +0900)]
wasapi: Fix possible deadlock while downwards state change

IAudioClient::Stop() doesn't seem to wake up the event handle,
then read() or write() could be blocked forever by WaitForSingleObject.

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

4 years agodocs: Update plugins cache
Thibault Saunier [Tue, 9 Jun 2020 19:31:56 +0000 (15:31 -0400)]
docs: Update plugins cache

4 years agowaylandsink: add wl_registry.global_remove listener
Haihua Hu [Tue, 9 Jun 2020 02:53:17 +0000 (10:53 +0800)]
waylandsink: add wl_registry.global_remove listener

when hotplug display, wayland client will call this listener
to notify client do clean up. Temporarily set a dummy function
here to avoid app abort

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

4 years agosrt: doc: Add missing gst_type_mark_as_plugin_api
Thibault Saunier [Mon, 8 Jun 2020 18:56:31 +0000 (14:56 -0400)]
srt: doc: Add missing gst_type_mark_as_plugin_api

4 years agodocs: Mark lv2 runtime generated enums as plugins API types
Thibault Saunier [Mon, 8 Jun 2020 17:03:09 +0000 (13:03 -0400)]
docs: Mark lv2 runtime generated enums as plugins API types

4 years agodocs: Add some more plugin API types
Thibault Saunier [Mon, 8 Jun 2020 16:30:59 +0000 (12:30 -0400)]
docs: Add some more plugin API types

And allow creating vulkan device object without specifying an instance
so it can be introspected.

4 years agodocs: Update plugins cache
Thibault Saunier [Mon, 8 Jun 2020 13:52:30 +0000 (09:52 -0400)]
docs: Update plugins cache

4 years agov4l2slh264dec: Fix reading mode and start code type
Nicolas Dufresne [Tue, 9 Jun 2020 14:48:06 +0000 (10:48 -0400)]
v4l2slh264dec: Fix reading mode and start code type

These two controls are not pointer based, so we don't need to pass any size or
pointer and need to copy the values afterward. This fixes H264 decoding
regression with Hantro and RKVDEC drivers.

Fixes 037730a787c6cdeeee5779c1834315c1ca764505

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

4 years agomftransform: Fix deadlock when MFT requests processing output twice
Seungha Yang [Mon, 8 Jun 2020 14:46:43 +0000 (23:46 +0900)]
mftransform: Fix deadlock when MFT requests processing output twice

This sequence of event/data flow might happen

1) Initially we have one pending output event
  1-1) Then, process the pending output data
2) No pending input event, then we should wait new pending input event
  2-1) Wakeup by new pending event (but it's pending output event)

In above case, MFT will not report new pending input event
if pending output is not processed.

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

4 years agomftransform: Add some debug log
Seungha Yang [Mon, 8 Jun 2020 10:22:07 +0000 (19:22 +0900)]
mftransform: Add some debug log

Add some trace level log for debugging

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

4 years agoadaptivedemux: Handle live duration queries
Edward Hervey [Tue, 19 May 2020 08:27:18 +0000 (10:27 +0200)]
adaptivedemux: Handle live duration queries

Handle it the same way live sources would, that it by handling the query and
return an unknown duration.

Fixes #566

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

4 years agotests: wasapi2: Add unit test for reusing wasapisrc
Seungha Yang [Sun, 10 May 2020 16:53:11 +0000 (01:53 +0900)]
tests: wasapi2: Add unit test for reusing wasapisrc

Test state change between playing and null and playing again

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

4 years agowasapi2: Add device provider implementation
Seungha Yang [Wed, 27 May 2020 20:09:47 +0000 (05:09 +0900)]
wasapi2: Add device provider implementation

Similar to device provider implementation of wasapi plugin,
this implementation supports only static probing.
But we can implement runtime device add/remove/update
monitoring using DeviceWatcher interface later.

See https://docs.microsoft.com/en-us/uwp/api/windows.devices.enumeration.devicewatcher

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

4 years agowasapi2: Introduce new WASAPI plugin
Seungha Yang [Mon, 25 May 2020 20:17:41 +0000 (05:17 +0900)]
wasapi2: Introduce new WASAPI plugin

Add a new wasapi implementation mainly to support UWP application.
Basically the core logic of this plugin is almost identical to
existing wasapi plugin, but main target is Windows 10 (+ UWP).
Since this plugin uses WinRT APIs, this plugin most likely might not
work Windows 8 or lower.

Compared with existing wasapi plugin, additional features of this plugin are
* Fully compatible with both Windows 10 desktop and UWP application
* Supports automatic stream routing (auto fallback when device was removed)
* Support device level mute/volume control

But some features of existing wasapi plugin are not implemented
in this plugin yet
* Exclusive streaming mode is not supported
* Loopback feature is not implemented
* Cross-compile is not possible with current mingw toolchain
  (meaning that MSVC and Windows 10 SDK are required to build this plugin)

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

4 years agomfvideoenc: Set PAR to output IMFMediaType
Seungha Yang [Sat, 6 Jun 2020 12:15:34 +0000 (21:15 +0900)]
mfvideoenc: Set PAR to output IMFMediaType

We've set it to input IMFMediaType but not for output.
So, if PAR is not 1:1, the input IMFMediaType will be accepted
by MFT (default is 1:1).
The PAR of input/output IMFMediaType must be identical

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

4 years agomftransform: Don't try to drain if MFT is not running
Seungha Yang [Sat, 6 Jun 2020 12:01:24 +0000 (21:01 +0900)]
mftransform: Don't try to drain if MFT is not running

Otherwise MFT will be blocked forever as no event can be generated by
IMFMediaEventGenerator.

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

4 years agoplugins: uddate gst_type_mark_as_plugin_api() calls
Mathieu Duponchelle [Fri, 5 Jun 2020 22:40:42 +0000 (00:40 +0200)]
plugins: uddate gst_type_mark_as_plugin_api() calls

4 years agod3d11overlaycompositor: Fix wrong Y position calculation
Seungha Yang [Fri, 5 Jun 2020 13:39:54 +0000 (22:39 +0900)]
d3d11overlaycompositor: Fix wrong Y position calculation

The Y coordinate of vertex and screen/image are opposite

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

4 years agocurlsmtpsink: Use correct email date format
cketti [Thu, 4 Jun 2020 11:33:59 +0000 (13:33 +0200)]
curlsmtpsink: Use correct email date format

See https://www.rfc-editor.org/rfc/rfc5322.html#section-3.3

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

4 years agoccconverter: signal cea608 padding as invalid
Matthew Waters [Tue, 2 Jun 2020 08:07:10 +0000 (18:07 +1000)]
ccconverter: signal cea608 padding as invalid

Outputting a valid but null cea608 byte pair may cause some issues with
some checksum packets.

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

4 years agoccconverter: also copy buffer metadata when draining
Matthew Waters [Tue, 2 Jun 2020 07:35:00 +0000 (17:35 +1000)]
ccconverter: also copy buffer metadata when draining

Fixes buffers without PTS/DTS/meta/etc when receiving an EOS with data
still stored in the internal scratch buffer.

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

4 years agoccconverter: Output the limit hit in debug lines
Matthew Waters [Tue, 2 Jun 2020 07:33:07 +0000 (17:33 +1000)]
ccconverter: Output the limit hit in debug lines

Fix two case of the input triplet limit not applying in cea608 -> cdp
conversion.

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

4 years agodoc: Require hotdoc >= 0.11.0
Thibault Saunier [Wed, 3 Jun 2020 22:38:58 +0000 (18:38 -0400)]
doc: Require hotdoc >= 0.11.0

4 years agodoc: Fix spelling of GstWebRTCICE
Thibault Saunier [Tue, 2 Jun 2020 19:06:38 +0000 (15:06 -0400)]
doc: Fix spelling of GstWebRTCICE

4 years agodocs: Update gst_plugins_cache.json
Sebastian Dröge [Wed, 27 May 2020 13:01:42 +0000 (16:01 +0300)]
docs: Update gst_plugins_cache.json

4 years agoclockselect: Don't register GstClockSelectClockId multiple times
Sebastian Dröge [Tue, 2 Jun 2020 09:51:35 +0000 (12:51 +0300)]
clockselect: Don't register GstClockSelectClockId multiple times

4 years agoplugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types
Sebastian Dröge [Sun, 31 May 2020 07:18:00 +0000 (10:18 +0300)]
plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types

4 years agosrtobject: continue polling or report error on failed receive
Peter Workman [Tue, 2 Jun 2020 21:29:16 +0000 (18:29 -0300)]
srtobject: continue polling or report error on failed receive

fixes #1277

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

4 years agod3dvideosink: Use secondary rank
Seungha Yang [Wed, 3 Jun 2020 08:49:41 +0000 (17:49 +0900)]
d3dvideosink: Use secondary rank

d3dvideosink will be replaced by d3d11videosink

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

4 years agod3d11videosink: Assign primary rank
Seungha Yang [Fri, 29 May 2020 19:56:58 +0000 (04:56 +0900)]
d3d11videosink: Assign primary rank

d3d11videosink has an advantage over d3dvideosink, such as
* Zero-copy playback with d3d11 decoders
* HDR rendering with 10-bit format/swapchain support
* UWP support
* Any system memory alignment/padding can be supported
* User can select target GPU device
And old d3dvideosink's functionality (e.g., navigation event, overlaycomposition)
can be covered by d3d11videosink

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

4 years agowebrtc: Add `Since: 1.18` markers to the new datachannel library API
Sebastian Dröge [Wed, 3 Jun 2020 07:32:00 +0000 (10:32 +0300)]
webrtc: Add `Since: 1.18` markers to the new datachannel library API

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

4 years agosrt: Make logging regarding callers more useful
Jan Alexander Steffens (heftig) [Fri, 15 May 2020 14:51:46 +0000 (16:51 +0200)]
srt: Make logging regarding callers more useful

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

4 years agowebrtc: Add GstWebRTCDataChannel to the library API
Sebastian Dröge [Mon, 1 Jun 2020 11:46:03 +0000 (14:46 +0300)]
webrtc: Add GstWebRTCDataChannel to the library API

This makes it more discoverable for bindings and allows bindings to
generate static API for the signals and functions.

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

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

4 years agovulkanimagememory: fix use-after-free releasing a view
Matthew Waters [Fri, 29 May 2020 12:21:10 +0000 (22:21 +1000)]
vulkanimagememory: fix use-after-free releasing a view

If the view has the last reference to the image, then
gst_clear_mini_object will destroy the image and the lock used in the
next line.

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

4 years agovkimagememory: actually check the length of a ptr array
Matthew Waters [Fri, 29 May 2020 12:17:24 +0000 (22:17 +1000)]
vkimagememory: actually check the length of a ptr array

Not it's value is > 0 which should always be true.

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

4 years agoavtp: Ensure that the avtp plugin is only built on Linux
Ederson de Souza [Thu, 28 May 2020 18:51:28 +0000 (11:51 -0700)]
avtp: Ensure that the avtp plugin is only built on Linux

It uses some Linux only features. This also prevents gst-build trying to
get libavtp on non-Linux environments.

4 years agotests/avtp: Plug some (more) leaks
Ederson de Souza [Fri, 29 May 2020 18:36:06 +0000 (11:36 -0700)]
tests/avtp: Plug some (more) leaks

Some leaks were introduced in new tests - this patch fix them.

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

4 years agomsdkh265enc: add support 12-bit 420 encoding
Haihao Xiang [Wed, 8 Apr 2020 06:40:56 +0000 (14:40 +0800)]
msdkh265enc: add support 12-bit 420 encoding

P016 is used for 12-bit encoding in MediaSDK, so the Shift flag is set
in the mfx parameters

Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=P012_LE ! msdkh265enc ! \
fakesink

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

4 years agomsdkvpp: fix "failed to create new MSDK memory"
Xu Guangxin [Tue, 19 May 2020 06:59:25 +0000 (14:59 +0800)]
msdkvpp: fix "failed to create new MSDK memory"

all msdk output surfaces come from out_alloc_resp, so the buffer count is not resizable.
we need set min_buffers, max_buffers to same size.

steps to reproduce
1. ffmpeg -f lavfi -i testsrc=duration=10:size=320x240:rate=30:decimals=3 -pix_fmt yuv420p -c:v libx265 ~/bits/hevc/test.265
2. GST_GL_PLATFORM=egl gst-launch-1.0 -v filesrc location=~/bits/hevc/test.265  ! h265parse ! msdkh265dec  ! msdkvpp ! queue ! glimagesink
you will see error like this:
ERROR                default gstmsdkvideomemory.c:77:gst_msdk_video_allocator_get_surface: failed to get surface available
ERROR         msdkbufferpool gstmsdkbufferpool.c:270:gst_msdk_buffer_pool_alloc_buffer:<msdkbufferpool2> failed to create new MSDK memory
ERROR                msdkvpp gstmsdkvpp.c:297:create_output_buffer:<msdkvpp0> failed to create output video buffer
ERROR                msdkdec gstmsdkdec.c:699:gst_msdkdec_finish_task:<msdkh265dec0> Failed to finish frame
ERROR                msdkdec gstmsdkdec.c:1085:gst_msdkdec_handle_frame:<msdkh265dec0> Failed to finish a task

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

4 years agomsdkvpp: hold GstBuffer ref count for locked surfaces
Xu Guangxin [Tue, 19 May 2020 07:14:34 +0000 (15:14 +0800)]
msdkvpp: hold GstBuffer ref count for locked surfaces

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

4 years agomediafoundation: Use core dispatcher of current view instead of main view
Seungha Yang [Fri, 29 May 2020 13:55:56 +0000 (22:55 +0900)]
mediafoundation: Use core dispatcher of current view instead of main view

Main view might be hidden depending on application's view tree.
In that case, ICoreApplication object doesn't return get_MainView() method

Note that nothing about this behavior was documented by Microsoft
https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.core.coreapplication.mainview

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

4 years agovulkan: fix use of assert() with older meson versions
Tim-Philipp Müller [Thu, 28 May 2020 21:48:15 +0000 (22:48 +0100)]
vulkan: fix use of assert() with older meson versions

Follow-up to !1307

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

4 years agovulkan: don't run tests or build lib if plugin isn't actually built
Tim-Philipp Müller [Thu, 28 May 2020 18:07:32 +0000 (19:07 +0100)]
vulkan: don't run tests or build lib if plugin isn't actually built

The unit tests only checked for vulkan_dep.found(), which can
be true if the libs are there but glslc was not found, in which
case the plugin wouldn't be built and the unit tests would fail
because of missing vulkan plugins.

Doesn't really make much sense to build the vulkan integration lib
either if we're not going to build the vulkan plugin, so just disable
both for now if glslc is not available.

Fixes #1301

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

4 years agompegtsdemux: tests: Test that tsparse doesn't drop padding
Jan Alexander Steffens (heftig) [Wed, 27 May 2020 12:44:01 +0000 (14:44 +0200)]
mpegtsdemux: tests: Test that tsparse doesn't drop padding

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

4 years agompegtsdemux: Deliver all packets to tsparse
Jan Alexander Steffens (heftig) [Tue, 26 May 2020 20:40:04 +0000 (22:40 +0200)]
mpegtsdemux: Deliver all packets to tsparse

34af8ed66a7c63048ce0bdf59bbe61011d7c6292 changed the code to use the
packetizer's packets instead of the incoming buffers, but mpegtsbase
didn't actually push all packets to the subclass. As a result, padding
(PID 0x1FFF) packets got lost.

Add a new boolean to toggle pushing unknown packets to mpegtsbase and
have mpegtsparse make use of it.

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

4 years agomediafoundation: Fix undeclared identifier error on UWP build
Seungha Yang [Thu, 28 May 2020 11:46:02 +0000 (20:46 +0900)]
mediafoundation: Fix undeclared identifier error on UWP build

Some symbols are not available in case of UWP

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

4 years agoavtp: Initialise strack structures to 0 in tests
Jan Schmidt [Thu, 28 May 2020 08:18:58 +0000 (18:18 +1000)]
avtp: Initialise strack structures to 0 in tests

Avoid valgrind warnings about accessing uninitialised memory
in the tests by initialisting structures to 0

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

4 years agoavtp: Fix some leaks in the tests
Jan Schmidt [Thu, 28 May 2020 07:33:43 +0000 (17:33 +1000)]
avtp: Fix some leaks in the tests

Fix valgrind errors that area showing on the CI now
that AVTP elements are built.

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

4 years agowebrtc: handle an ice-lite remote offer
Matthew Waters [Mon, 25 May 2020 03:10:20 +0000 (13:10 +1000)]
webrtc: handle an ice-lite remote offer

When the remote peer offers an ice-lite SDP, we need to configure our
ICE negotiation to be in controlling mode as the peer will not be.

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

4 years agocodecparsers: fix typo in GstH265RegisteredUserData doc
Stéphane Cerveau [Fri, 8 May 2020 15:30:21 +0000 (17:30 +0200)]
codecparsers: fix typo in GstH265RegisteredUserData doc

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

4 years agotests: fix meson test env setup to make sure we use the right gst-plugin-scanner
Tim-Philipp Müller [Wed, 27 May 2020 14:17:12 +0000 (15:17 +0100)]
tests: fix meson test env setup to make sure we use the right gst-plugin-scanner

If core is built as a subproject (e.g. as in gst-build), make sure to use
the gst-plugin-scanner from the built subproject. Without this, gstreamer
might accidentally use the gst-plugin-scanner from the install prefix if
that exists, which in turn might drag in gst library versions we didn't
mean to drag in. Those gst library versions might then be older than
what our current build needs, and might cause our newly-built plugins
to get blacklisted in the test registry because they rely on a symbol
that the wrongly-pulled in gst lib doesn't have.

This should fix running of unit tests in gst-build when invoking
meson test or ninja test from outside the devenv for the case where
there is an older or different-version gst-plugin-scanner installed
in the install prefix.

In case no gst-plugin-scanner is installed in the install prefix, this
will fix "GStreamer-WARNING: External plugin loader failed. This most
likely means that the plugin loader helper binary was not found or
could not be run. You might need to set the GST_PLUGIN_SCANNER
environment variable if your setup is unusual." warnings when running
the unit tests.

In the case where we find GStreamer core via pkg-config we use
a newly-added pkg-config var "pluginscannerdir" to get the right
directory. This has the benefit of working transparently for both
installed and uninstalled pkg-config files/setups.

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

4 years agomediafoundation: Add support MP3 audio encoding
Seungha Yang [Thu, 21 May 2020 20:55:03 +0000 (05:55 +0900)]
mediafoundation: Add support MP3 audio encoding

Add MediaFoundation MP3 encoder

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

4 years agomediafoundation: Add support for AAC encoding
Seungha Yang [Mon, 18 May 2020 09:12:38 +0000 (18:12 +0900)]
mediafoundation: Add support for AAC encoding

Add MediaFoundation AAC encoder element.

Before Windows 10, mono and stereo channels were supported audio channels
configuration by AAC encoder MFT. However, on Windows 10,
5.1 channels support was introduced.

To expose correct range of support format by this element
whatever the OS version is, this element will enumerate
all the supported format by the AAC encoder MFT
and then will configure sink/src templates while plugin init.

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

4 years agomfutils: Move IMediaType release function to common utility
Seungha Yang [Sat, 23 May 2020 15:46:38 +0000 (00:46 +0900)]
mfutils: Move IMediaType release function to common utility

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

4 years agomediafoundation: Add util function to dump IMFAttributes values
Seungha Yang [Sun, 17 May 2020 15:41:14 +0000 (00:41 +0900)]
mediafoundation: Add util function to dump IMFAttributes values

It would be useful for debugging.

Reference: https://docs.microsoft.com/en-us/windows/win32/medfound/media-type-debugging-code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1280>

4 years agod3d11window_win32: Create internal window on parent window's thread
Seungha Yang [Tue, 26 May 2020 18:50:57 +0000 (03:50 +0900)]
d3d11window_win32: Create internal window on parent window's thread

If parent and child windows are running on different thread,
there is always a chance to cause deadlock as DefWindowProc() call
from child window thread might be blocked until the message
is handled by parent's window procedure.

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

4 years agod3d11window: Add unprepare method to clear internal resource
Seungha Yang [Tue, 26 May 2020 16:52:59 +0000 (01:52 +0900)]
d3d11window: Add unprepare method to clear internal resource

GObject::dispose method can be called multiple times. As win32 d3d11window
has an internal thread and because GObject::dispose method could be called from the
thread, it might cause problems such as trying to join self-thread

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

4 years agomfsourceobject: Remove useless null check for string
Seungha Yang [Mon, 25 May 2020 12:18:16 +0000 (21:18 +0900)]
mfsourceobject: Remove useless null check for string

We can pass null for the value of string type property.

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

4 years agomediafoundation: Use G_BEGIN_DECLS/G_END_DECLS pair everywhere
Seungha Yang [Mon, 25 May 2020 11:59:50 +0000 (20:59 +0900)]
mediafoundation: Use G_BEGIN_DECLS/G_END_DECLS pair everywhere

... instead of extern "c" {} block.

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

4 years agomediafoundation: Add support video capture on UWP app
Seungha Yang [Wed, 20 May 2020 14:23:08 +0000 (23:23 +0900)]
mediafoundation: Add support video capture on UWP app

New video capture implementation using WinRT Media APIs for UWP app.
Due to the strict permission policy of UWP, device enumeration and
open should be done via new WinRT APIs and to get permission from users,
it will invoke permission dialog on UI.
Strictly saying, this implementation is not a part of MediaFoundation
but structurally it's very similar to MediaFoundation API.
So we can avoid some code duplication by adding this implementation
into MediaFoundation plugin.

This implementation requires UniversalApiContract version >= 6.0
which is part of Windows 10 version 1803 (Redstone 4)

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

4 years agomfsourceobject: Move device name, path, and index to public struct
Seungha Yang [Wed, 20 May 2020 14:56:38 +0000 (23:56 +0900)]
mfsourceobject: Move device name, path, and index to public struct

... so that subclass can access each value and update them.

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

4 years agomediafoundation: Fix typo in source object impl.
Seungha Yang [Wed, 20 May 2020 13:59:19 +0000 (22:59 +0900)]
mediafoundation: Fix typo in source object impl.

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

4 years agoaudiobuffersplit: Unset DISCONT flag if not discontinuous
Sebastian Dröge [Mon, 25 May 2020 12:36:38 +0000 (15:36 +0300)]
audiobuffersplit: Unset DISCONT flag if not discontinuous

And also set/unset the RESYNC flag accordingly.

It can happen that the flag is preserved by GstAdapter from the input
buffer. For example if a big input buffer is split into many small ones,
each of the small ones would have the flag set.

All other buffer flags seem safe to keep here if they were set,
including the GAP flag.

Also ensure that the buffer is actually writable before changing any
flags or metadata on it.

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