platform/upstream/gstreamer.git
3 years agonvcodec: Fix compiler error if OpenGL is not enabled
Julian Bouzas [Thu, 24 Sep 2020 15:25:33 +0000 (11:25 -0400)]
nvcodec: Fix compiler error if OpenGL is not enabled

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

3 years agonvcodec: Add missing CUDAMemory src caps in h264 decoder
Julian Bouzas [Thu, 24 Sep 2020 14:33:58 +0000 (10:33 -0400)]
nvcodec: Add missing CUDAMemory src caps in h264 decoder

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

3 years agonvcodec: Add missing CUDAMemory sink caps in h264 and h265 encoders
Julian Bouzas [Wed, 23 Sep 2020 17:49:43 +0000 (13:49 -0400)]
nvcodec: Add missing CUDAMemory sink caps in h264 and h265 encoders

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

3 years agonvcodec: Fix description of cudadownload element
Julian Bouzas [Tue, 22 Sep 2020 17:07:19 +0000 (13:07 -0400)]
nvcodec: Fix description of cudadownload element

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

3 years agotests: Add CUDA filter unit tests
Seungha Yang [Sun, 11 Aug 2019 06:02:04 +0000 (15:02 +0900)]
tests: Add CUDA filter unit tests

Adding a test for buffer meta and colorspace conversion

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

3 years agonvcodec: Add CUDA video scale element
Seungha Yang [Wed, 16 Oct 2019 13:43:09 +0000 (22:43 +0900)]
nvcodec: Add CUDA video scale element

Add new element for video resizing using CUDA

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

3 years agonvcodec: Add CUDA video convert element
Seungha Yang [Wed, 16 Oct 2019 13:42:55 +0000 (22:42 +0900)]
nvcodec: Add CUDA video convert element

Add new element for colorspace conversion using CUDA.

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

3 years agonvcodec: Add generic CUDA video convert object
Seungha Yang [Wed, 16 Oct 2019 13:42:39 +0000 (22:42 +0900)]
nvcodec: Add generic CUDA video convert object

Introducing generic video convert object similar to video-converter
but using CUDA.

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

3 years agonvcodec: Add support runtime CUDA kernel source compilation
Seungha Yang [Wed, 16 Oct 2019 13:42:24 +0000 (22:42 +0900)]
nvcodec: Add support runtime CUDA kernel source compilation

Add util functions for runtime CUDA kernel source compilation
using NVRTC library. Like other nvcodec dependent libraries,
NVRTC library will be loaded via g_module_open.

Note that the NVRTC library naming is not g_module_open friendly
on Windows.
(i.e., nvrtc64_{CUDA major version}{CUDA minor version}.dll).
So users can specify the dll name using GST_NVCODEC_NVRTC_LIBNAME
environment.

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

3 years agonvcodec: Add CUDA upload/download elements with base class for CUDA filters
Seungha Yang [Wed, 16 Oct 2019 13:42:06 +0000 (22:42 +0900)]
nvcodec: Add CUDA upload/download elements with base class for CUDA filters

Similar to glupload/gldownload elements but for CUDA memory.
It will help transfer memory between system and nvidia GPU

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

3 years agonvcodec: Peer direct access support
Seungha Yang [Wed, 16 Oct 2019 13:21:05 +0000 (22:21 +0900)]
nvcodec: Peer direct access support

If support direct access each other, use device to device memory copy
without staging host memory

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

3 years agocudacontext: Enable direct CUDA memory access over multiple GPUs
Seungha Yang [Fri, 30 Aug 2019 08:19:44 +0000 (17:19 +0900)]
cudacontext: Enable direct CUDA memory access over multiple GPUs

If each device context can access each other, enable peer access
for better interoperability.

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

3 years agonvenc: Support CUDA buffer pool
Seungha Yang [Fri, 30 Aug 2019 04:57:15 +0000 (13:57 +0900)]
nvenc: Support CUDA buffer pool

When upstream support CUDA memory (only nvdec for now), we will create
CUDA buffer pool.

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

3 years agonvdec: Support CUDA buffer pool
Seungha Yang [Fri, 30 Aug 2019 04:55:25 +0000 (13:55 +0900)]
nvdec: Support CUDA buffer pool

If downstream can accept CUDA memory caps feature (currently nvenc only),
always CUDA memory is preferred.

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

3 years agonvcodec: Add CUDA specific memory and bufferpool
Seungha Yang [Mon, 19 Aug 2019 09:02:56 +0000 (18:02 +0900)]
nvcodec: Add CUDA specific memory and bufferpool

Introducing CUDA buffer pool with generic CUDA memory support.
Likewise GL memory, any elements which are able to access CUDA device
memory directly can map this CUDA memory without upload/download
overhead via the "GST_MAP_CUDA" map flag.
Also usual GstMemory map/unmap is also possible with internal staging memory.

For staging, CUDA Host allocated memory is used (see CuMemAllocHost API).
The memory is allowing system access but has lower overhead
during GPU upload/download than normal system memory.

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

3 years agocodecparsers: h264parser: guard against ref_pic_markings overflow
Andrew Wesie [Fri, 16 Oct 2020 11:29:02 +0000 (12:29 +0100)]
codecparsers: h264parser: guard against ref_pic_markings overflow

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

3 years agohlssink2: fix and flesh out docs
Tim-Philipp Müller [Thu, 15 Oct 2020 23:48:01 +0000 (00:48 +0100)]
hlssink2: fix and flesh out docs

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

3 years agomeson: update glib minimum version to 2.56
Stéphane Cerveau [Thu, 15 Oct 2020 16:26:48 +0000 (18:26 +0200)]
meson: update glib minimum version to 2.56

In order to support the symbol g_enum_to_string in various
project using GStreamer ( gst-validate etc.), the glib minimum
version should be 2.56.0.

Remove compat code as glib requirement
is now > 2.56

Version used by Ubuntu 18.04 LTS

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

3 years agod3d11: vp8dec: No need to check show_frame flag when output_picture.
He Junyan [Sun, 11 Oct 2020 17:04:13 +0000 (01:04 +0800)]
d3d11: vp8dec: No need to check show_frame flag when output_picture.

The VP8 base class has already handled it for us.

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

3 years agocodecs: vp8decoder: handle the show_frame check in base class.
He Junyan [Sun, 11 Oct 2020 16:57:24 +0000 (00:57 +0800)]
codecs: vp8decoder: handle the show_frame check in base class.

Move the show_frame check from sub class to vp8 decoder's base class.
Calling the sub class' output_picture() function only when the frame
is displayed and marking the other automatically as decode only.

This is done to avoid logic and code repetition in subclasses.

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

3 years agocodecs: vp9decoder: handle the show_frame check in base class
Seungha Yang [Thu, 15 Oct 2020 17:06:49 +0000 (02:06 +0900)]
codecs: vp9decoder: handle the show_frame check in base class

Same as vp8 decoder update https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1670

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

3 years agov4l2codecs: vp8: Allow baseclass from skipping frames
Nicolas Dufresne [Thu, 15 Oct 2020 16:08:19 +0000 (12:08 -0400)]
v4l2codecs: vp8: Allow baseclass from skipping frames

In preparation for !1670, this will allow the base class from skipping frames
that should not be displayed. Previously it would complain about unordered
decoding taking place in the driver.

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

3 years agov4l2codecs: decoder: Unmark previously pending request
Nicolas Dufresne [Thu, 15 Oct 2020 16:05:45 +0000 (12:05 -0400)]
v4l2codecs: decoder: Unmark previously pending request

requests are executed in order, so while dequeuing sink buffers for previous
request, also mark these request as no longer pending. This will allow reusing
the request later.

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

3 years agov4l2codecs: decoder: Properly remove pending requests
Nicolas Dufresne [Thu, 15 Oct 2020 15:35:04 +0000 (11:35 -0400)]
v4l2codecs: decoder: Properly remove pending requests

Pass the pointer instead of NULL in order to find and remove properly any
pending request from the queue. This coding error was leading to use after
free in error and early exit cases.

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

3 years agova: basedec: Create the other pool anyway.
He Junyan [Wed, 14 Oct 2020 11:04:44 +0000 (19:04 +0800)]
va: basedec: Create the other pool anyway.

Fix a bug in _create_other_pool(). The old way of checking the
base->other_pool make that other_pool never be changed until the
gst_va_base_dec_stop() to stop the current decoding context.
But in some stream, the resolution may change during the decoding
process, and we need to re-negotiate the buffer pool. Then, the
old other_pool can not be clean correctly and the new correct one
can not be created.

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

3 years agova: basedec: Should unmap src frame when dst frame map failing.
He Junyan [Wed, 14 Oct 2020 08:54:54 +0000 (16:54 +0800)]
va: basedec: Should unmap src frame when dst frame map failing.

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

3 years agova: bufferpool: use release_buffer to clean the mem.
He Junyan [Tue, 13 Oct 2020 07:28:24 +0000 (15:28 +0800)]
va: bufferpool: use release_buffer to clean the mem.

The current bufferpool wastes all pre-allocate buffers when the
buffer pool is actived.
The pool->priv->size is 0 for va buffer pool. And every time, the
reset_buffer() will clean all mem and make the buffer size 0, that
can cache the gst_buffer in the buffer pool.
But when the buffer pool is activing, the default_start() just
allocate the buffer and release_buffer() immediately, all the pre
allocated buffers and surfaces are destroyed because of
gst_buffer_get_size (buffer) != pool->priv->size.
We need to use release_buffer() to do the clean job at the pool
start time.

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

3 years agoh265parse: Don't enable passthrough by default
Seungha Yang [Sat, 3 Oct 2020 17:02:16 +0000 (02:02 +0900)]
h265parse: Don't enable passthrough by default

SEI messages contain various information which wouldn't be conveyed
by using upstream CAPS (HDR, timecode for example).

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

3 years agocameracalibrate: Improve gst-inspect documentation
Vivia Nikolaidou [Tue, 13 Oct 2020 10:11:06 +0000 (13:11 +0300)]
cameracalibrate: Improve gst-inspect documentation

Thanks to @kazz_naka on Twitter

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

3 years agowpesrc: add some debug logging around WPEView creation/destruction
Matthew Waters [Wed, 7 Oct 2020 10:13:09 +0000 (21:13 +1100)]
wpesrc: add some debug logging around WPEView creation/destruction

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

3 years agowpesrc: fix a memory leak of the bytes
Matthew Waters [Wed, 7 Oct 2020 10:14:55 +0000 (21:14 +1100)]
wpesrc: fix a memory leak of the bytes

free the previous GBytes if load-bytes is called multiple times
before view creation.

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

3 years agowpesrc: only create webview if not already created
Matthew Waters [Tue, 6 Oct 2020 11:19:21 +0000 (22:19 +1100)]
wpesrc: only create webview if not already created

e.g. _decide_allocation() can be called multiple times throughout the
element's lifetime and we only want to create the view once rather than
overwriting.

Fixes a leak of the WPEView under certain circumstances.

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

3 years agowpe: free a previous pending image/shm buffer
Matthew Waters [Fri, 2 Oct 2020 02:06:59 +0000 (12:06 +1000)]
wpe: free a previous pending image/shm buffer

Don't blindly overwrite a possibly previously set buffer.

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

3 years agosrtsrc: Prevent `delay` from being negative
Jan Alexander Steffens (heftig) [Mon, 12 Oct 2020 12:15:49 +0000 (14:15 +0200)]
srtsrc: Prevent `delay` from being negative

`delay` should be a GstClockTimeDiff since SRT time is int64_t.

All values are in local time so we should never see a srctime that's in
the future. If we do, clamp the delay to 0 and warn about it.

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

3 years agosrtsrc: Don't calculate a delay if the srctime is 0
Jan Alexander Steffens (heftig) [Mon, 12 Oct 2020 12:12:24 +0000 (14:12 +0200)]
srtsrc: Don't calculate a delay if the srctime is 0

A zero srctime is a missing srctime. Apparently this can happen when
["the connection is not between SRT peers or if Timestamp-Based Packet
Delivery mode (TSBPDMODE) is not enabled"][1] so it may not apply to us,
but it's best to be defensive.

[1]: https://github.com/Haivision/srt/blob/v1.4.2/docs/API.md#sending-and-receiving

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

3 years agosrtsrc: Defend against missing clock
Jan Alexander Steffens (heftig) [Mon, 12 Oct 2020 12:09:28 +0000 (14:09 +0200)]
srtsrc: Defend against missing clock

If we don't have a clock, stop the source instead of asserting in
gst_clock_get_time. This can happen when the element is removed from the
pipeline while it's playing.

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

3 years agortpmanagerbad: remove duplicate parent declaration
Marc Leeman [Mon, 12 Oct 2020 11:56:50 +0000 (13:56 +0200)]
rtpmanagerbad: remove duplicate parent declaration

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

3 years agortmp2sink: fix since marker on new "stop-commands" property
Tim-Philipp Müller [Mon, 12 Oct 2020 10:55:46 +0000 (11:55 +0100)]
rtmp2sink: fix since marker on new "stop-commands" property

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

3 years agova: basedec: copy frames logic to decide_allocation()
Víctor Manuel Jáquez Leal [Fri, 9 Oct 2020 14:00:18 +0000 (16:00 +0200)]
va: basedec: copy frames logic to decide_allocation()

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

3 years agova: basedec: refactor the other video pool instantiation
Víctor Manuel Jáquez Leal [Fri, 9 Oct 2020 13:47:43 +0000 (15:47 +0200)]
va: basedec: refactor the other video pool instantiation

Just a code clean up

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

3 years agova: basedec: add gstvabasedec helper
Víctor Manuel Jáquez Leal [Thu, 8 Oct 2020 17:39:56 +0000 (19:39 +0200)]
va: basedec: add gstvabasedec helper

This is a helper for all decoders.

It is not an abstract subclass, just merely a helper that avoids code
duplication among the decoders.

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

3 years agova: vp8dec: add element documentation
Víctor Manuel Jáquez Leal [Fri, 9 Oct 2020 08:33:58 +0000 (10:33 +0200)]
va: vp8dec: add element documentation

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

3 years agova: h264dec: set video alignment definition earlier
Víctor Manuel Jáquez Leal [Fri, 9 Oct 2020 10:27:12 +0000 (12:27 +0200)]
va: h264dec: set video alignment definition earlier

This patch renames need_cropping variable to need_videoalign which is clearer
with its function. And now GstVideoAlignment is part of GstVaH264Dec structure,
so it can be set earlier.

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

3 years agodtlsconnection: Ignore OpenSSL system call errors
Olivier Crête [Mon, 5 Oct 2020 20:40:55 +0000 (16:40 -0400)]
dtlsconnection: Ignore OpenSSL system call errors

OpenSSL shouldn't be making real system calls, so we can safely
ignore syscall errors. System interactions should happen through
our BIO. So especially don't look at the system's errno, as it
should be meaningless.

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

3 years agotests: svthevcenc: Fix test_encode_simple
Jan Alexander Steffens (heftig) [Sat, 12 Sep 2020 00:48:43 +0000 (02:48 +0200)]
tests: svthevcenc: Fix test_encode_simple

Pick the same I420 format the other test use. Without this, the source
picks AYUV64, which fails.

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

3 years agova: allocator: add _set_format() and _get_format()
Víctor Manuel Jáquez Leal [Wed, 7 Oct 2020 16:03:20 +0000 (18:03 +0200)]
va: allocator: add _set_format() and _get_format()

Since allocators keep an available memory queue to reuse, video format and usage
hint are now persistant while allocator's memories are around.

This patch adds _set_format() and _get_format() for both VA allocators.

_set_format() validates if given format can be used or reused. If no allocated
surface previously it creates a dummy one to fetch its offsets and
strides. Updated info is returned to callee.

GstVaPool uses _set_format() at config to verify the allocator capacity and to
get the surfaces offsets and strides, which are going to be used by the video
meta.

Allocator extracted caps are compared with caps from config and if they have
different strides or offsets, force_videometa is set.

A new bufferpool method gst_va_pool_requires_video_meta() is added return the
value of force_videometa. This value is checked in order to know if decoders
need to copy the surface if downstream doesn't announce video meta support.

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

3 years agova: caps: added gst_caps_is_raw()
Víctor Manuel Jáquez Leal [Thu, 8 Oct 2020 12:10:41 +0000 (14:10 +0200)]
va: caps: added gst_caps_is_raw()

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

3 years agova: pool: call parent's start() method
Víctor Manuel Jáquez Leal [Thu, 8 Oct 2020 08:26:54 +0000 (10:26 +0200)]
va: pool: call parent's start() method

Without preallocating buffers and memories a deadlock in pool allocator is
highly probably since it might hit the case were buffer is returned to the pool
but their memories are still hold by a copy downstream, without other
preallocated buffers available.

This kind of a hack, where buffer_reset() follow the normal path if it's called
from start().

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

3 years agova: pool: fix log's object
Víctor Manuel Jáquez Leal [Wed, 7 Oct 2020 14:18:30 +0000 (16:18 +0200)]
va: pool: fix log's object

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

3 years agova: allocator: remove noisy log message
Víctor Manuel Jáquez Leal [Thu, 8 Oct 2020 08:30:28 +0000 (10:30 +0200)]
va: allocator: remove noisy log message

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

3 years agova: allocator: add a todo for dmabuf_memories_setup()
Víctor Manuel Jáquez Leal [Wed, 7 Oct 2020 09:08:49 +0000 (11:08 +0200)]
va: allocator: add a todo for dmabuf_memories_setup()

It would be nice to add a surface pool for this type of surface allocation in
order to have a better control of them.

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

3 years agova: allocator: add a surface counter
Víctor Manuel Jáquez Leal [Wed, 7 Oct 2020 08:16:27 +0000 (10:16 +0200)]
va: allocator: add a surface counter

Every time a new surface is created the counter increases by one, and when it is
destroyed (or will be destroyed in case of GstVaAllocator), the counter is
decreased. Then, at allocator dispose, it is warning if the counter is not zero.

This counter will be also used to check if the allocator can change its
configuration if the counter is zero or can not.

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

3 years agova: allocator: remove GstVideoInfo from GstVaBufferSurface
Víctor Manuel Jáquez Leal [Tue, 6 Oct 2020 18:01:04 +0000 (20:01 +0200)]
va: allocator: remove GstVideoInfo from GstVaBufferSurface

Don't store it them anymore since it is related with the negotiated stream and
not the concrete buffer.

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

3 years agova: remove GstVideoInfo parameter from _get_surface() functions
Víctor Manuel Jáquez Leal [Tue, 6 Oct 2020 17:54:26 +0000 (19:54 +0200)]
va: remove GstVideoInfo parameter from _get_surface() functions

There shouldn't be need to retrieve GstVideoInfo per buffer or memory since it
is the same for all the negotiated stream.

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

3 years agova: vpp: don't fetch video info from buffer
Víctor Manuel Jáquez Leal [Tue, 6 Oct 2020 17:40:16 +0000 (19:40 +0200)]
va: vpp: don't fetch video info from buffer

Instead of fetching video info from the buffer, use the already set ones.

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

3 years agova: dec, vpp: don't get buffer size from allocators
Víctor Manuel Jáquez Leal [Wed, 7 Oct 2020 10:49:44 +0000 (12:49 +0200)]
va: dec, vpp: don't get buffer size from allocators

Since buffer size is now ignored by bufferpool there's no need to get tha value
from the allocator.

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

3 years agova: pool: ignore size in config
Víctor Manuel Jáquez Leal [Sun, 4 Oct 2020 09:14:38 +0000 (11:14 +0200)]
va: pool: ignore size in config

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

3 years agoh265parse: set interlace-mode=interleaved on interlaced content
Guillaume Desmottes [Mon, 5 Oct 2020 09:07:25 +0000 (11:07 +0200)]
h265parse: set interlace-mode=interleaved on interlaced content

interlace-mode=alternate is a special case of interlace-mode=interleaved
where the fields are split using two different buffers.

We should use the latter instead of the former to no break compat with
elements supporting only 'interleaved'.
Decoders producing alternate, such as OMX on the Zynq, should change the
interlace-mode on their output caps.

Fix https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/825

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

3 years agoReplace LGPL v2 with LGPL v2.1 in COPYING and remove COPYING.LIB
Jacek Tomaszewski [Fri, 9 Oct 2020 08:24:50 +0000 (10:24 +0200)]
Replace LGPL v2 with LGPL v2.1 in COPYING and remove COPYING.LIB

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

3 years agoReplace GPL v2 with LGPL v2 in COPYING file
Jacek Tomaszewski [Fri, 2 Oct 2020 09:42:07 +0000 (11:42 +0200)]
Replace GPL v2 with LGPL v2 in COPYING file

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

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

3 years agosrt: Consume the error from gst_srt_object_write
Jan Alexander Steffens (heftig) [Thu, 8 Oct 2020 15:52:05 +0000 (17:52 +0200)]
srt: Consume the error from gst_srt_object_write

Instead of leaking it.

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

3 years agosrt: Check socket state before retrieving payload size
Jan Alexander Steffens (heftig) [Thu, 8 Oct 2020 15:48:20 +0000 (17:48 +0200)]
srt: Check socket state before retrieving payload size

The connection might be broken, which we should detect instead of just
aborting the write.

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

3 years agox265enc: fix deadlock on reconfig
Jakub Adam [Thu, 8 Oct 2020 16:25:59 +0000 (18:25 +0200)]
x265enc: fix deadlock on reconfig

Don't attempt to obtain encoder lock that is already held by
gst_x265_enc_encode_frame().

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

3 years agowebrtc: Require gstreamer-sdp in the pkg-config file
Sebastian Dröge [Wed, 7 Oct 2020 08:04:30 +0000 (11:04 +0300)]
webrtc: Require gstreamer-sdp in the pkg-config file

Some headers include API from it.

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

3 years agosrtsrc: Fix timestamping
Edward Hervey [Tue, 6 Oct 2020 09:45:36 +0000 (11:45 +0200)]
srtsrc: Fix timestamping

SRT provides the original timestamp of a packet (with drift/skew corrected for
local clock), which is what should be used for timestamping the outgoing
buffers. This ensures that we output the packets with the same timestamp (and by
extension rate) as the original feed.

Also detect if packets were dropped (by checking the sequence number) and
properly set DISCONT flag on the outgoing buffer.

Finally answer the latency queries

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

3 years agomfvideosrc: Use only the first video stream per device
Seungha Yang [Tue, 6 Oct 2020 20:05:25 +0000 (05:05 +0900)]
mfvideosrc: Use only the first video stream per device

Non-first video stream might not be working with current
implementation. It could be non-video (e.g., photo source) and then
ReadSample() might be blocked forever.

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

3 years agodecklink: Update doc
Seungha Yang [Wed, 7 Oct 2020 18:15:21 +0000 (03:15 +0900)]
decklink: Update doc

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

3 years agodecklink: Update Windows headers with SDK 11.2
Seungha Yang [Wed, 7 Oct 2020 16:39:42 +0000 (01:39 +0900)]
decklink: Update Windows headers with SDK 11.2

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

3 years agodecklink: Update OSX headers with SDK 11.2
Seungha Yang [Wed, 7 Oct 2020 16:33:35 +0000 (01:33 +0900)]
decklink: Update OSX headers with SDK 11.2

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

3 years agodecklink: Updated DeckLink SDK to 11.2 to support DeckLink 8K Pro
Tim [Tue, 25 Jun 2019 09:51:32 +0000 (11:51 +0200)]
decklink: Updated DeckLink SDK to 11.2 to support DeckLink 8K Pro

Updated Decklink SDK to version 11.2 in order to support newer cards like the Decklink 8K Pro.
This required to replace the duplex property by a profile property.

Profile values can be the following:
-  bmdProfileOneSubDeviceFullDuplex
-  bmdProfileOneSubDeviceHalfDuplex
-  bmdProfileTwoSubDevicesFullDuplex
-  bmdProfileTwoSubDevicesHalfDuplex
-  bmdProfileFourSubDevicesHalfDuplex

Fixes #987

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

3 years agomfvideosrc: Fix invalid memory access when outputting jpeg
Seungha Yang [Wed, 7 Oct 2020 08:37:25 +0000 (17:37 +0900)]
mfvideosrc: Fix invalid memory access when outputting jpeg

Don't access unknown-dangerous-nonsense address

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

3 years agoRevert "webrtc: Save the media kind in the transceiver"
Sebastian Dröge [Thu, 8 Oct 2020 15:50:12 +0000 (18:50 +0300)]
Revert "webrtc: Save the media kind in the transceiver"

This reverts commit f54d8e99457996303b8477b1f3a710f0fabd1cc6.

It breaks the CI until the C# bindings are fixed.

3 years agoRevert "rtpsender: Add API to set the priority"
Sebastian Dröge [Thu, 8 Oct 2020 15:49:57 +0000 (18:49 +0300)]
Revert "rtpsender: Add API to set the priority"

This reverts commit a8b287c76472c8d7fd38800807c482d020ff4a63.

It breaks the CI until the C# bindings are fixed.

3 years agoRevert "rtptransceiver: Store the SSRC of the current stream"
Sebastian Dröge [Thu, 8 Oct 2020 15:49:56 +0000 (18:49 +0300)]
Revert "rtptransceiver: Store the SSRC of the current stream"

This reverts commit d1da271f255101dbe95a426d9f5065d300b53e5a.

It breaks the CI until the C# bindings are fixed.

3 years agoRevert "webrtcbin: Remove unused function"
Sebastian Dröge [Thu, 8 Oct 2020 15:49:55 +0000 (18:49 +0300)]
Revert "webrtcbin: Remove unused function"

This reverts commit 39723dbe934186c11f7b2a2b04c0af7932a1509c.

It breaks the CI until the C# bindings are fixed.

3 years agoRevert "webrtc: Set the DSCP markings based on the priority"
Sebastian Dröge [Thu, 8 Oct 2020 15:49:54 +0000 (18:49 +0300)]
Revert "webrtc: Set the DSCP markings based on the priority"

This reverts commit 8ba08598bbe51f3b1f063ae22605f9608865f16b.

It breaks the CI until the C# bindings are fixed.

3 years agoRevert "webrtc: Document more objects"
Sebastian Dröge [Thu, 8 Oct 2020 15:49:53 +0000 (18:49 +0300)]
Revert "webrtc: Document more objects"

This reverts commit ad68c6b1eb7c73c66dc9d1dbf1a8cc47fd489c61.

It breaks the CI until the C# bindings are fixed.

3 years agoRevert "webrtc: Add hotdoc style since tags"
Sebastian Dröge [Thu, 8 Oct 2020 15:49:50 +0000 (18:49 +0300)]
Revert "webrtc: Add hotdoc style since tags"

This reverts commit 63a5fa818c31ecbe43891c077a38b6b162d73c28.

It breaks the CI until the C# bindings are fixed.

3 years agowebrtc: Add hotdoc style since tags
Olivier Crête [Tue, 6 Oct 2020 20:52:48 +0000 (16:52 -0400)]
webrtc: Add hotdoc style since tags

We're stuck having to add a separate comment for now.

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

3 years agowebrtc: Document more objects
Olivier Crête [Sat, 3 Oct 2020 01:38:00 +0000 (21:38 -0400)]
webrtc: Document more objects

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

3 years agowebrtc: Set the DSCP markings based on the priority
Olivier Crête [Wed, 8 Jul 2020 21:24:36 +0000 (17:24 -0400)]
webrtc: Set the DSCP markings based on the priority

This matches how the WebRTC javascript API works and the Chrome implementation.

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

3 years agowebrtcbin: Remove unused function
Olivier Crête [Thu, 9 Jul 2020 17:45:20 +0000 (13:45 -0400)]
webrtcbin: Remove unused function

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

3 years agortptransceiver: Store the SSRC of the current stream
Olivier Crête [Thu, 9 Jul 2020 17:42:35 +0000 (13:42 -0400)]
rtptransceiver: Store the SSRC of the current stream

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

3 years agortpsender: Add API to set the priority
Olivier Crête [Thu, 9 Jul 2020 17:39:03 +0000 (13:39 -0400)]
rtpsender: Add API to set the priority

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

3 years agowebrtc: Save the media kind in the transceiver
Olivier Crête [Wed, 8 Jul 2020 23:13:33 +0000 (19:13 -0400)]
webrtc: Save the media kind in the transceiver

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

3 years agosrt: Remove unused sa_family tracking
Jan Alexander Steffens (heftig) [Tue, 6 Oct 2020 11:39:23 +0000 (13:39 +0200)]
srt: Remove unused sa_family tracking

Now that SRT no longer needs the family when creating the socket, this
code has become useless.

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

3 years agosrt: Move off deprecated `srt_socket()`.
Niklas Hambüchen [Fri, 2 Oct 2020 01:39:40 +0000 (03:39 +0200)]
srt: Move off deprecated `srt_socket()`.

See https://github.com/Haivision/srt/blob/73ee1e1a3e3adc2702a9a5057d101ef80447b38c/docs/API-functions.md#srt_socket

`srt_create_socket()` was added in
https://github.com/Haivision/srt/commit/4b897ba92d34f1829a1c6e419eeab17f0763a0fc
and srt `v1.3.0` is the first release that has it.

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

3 years agosrt: Register a log handler
Jan Alexander Steffens (heftig) [Thu, 1 Oct 2020 15:31:13 +0000 (17:31 +0200)]
srt: Register a log handler

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

3 years agosrt: Avoid removing invalid sockets from the polls
Jan Alexander Steffens (heftig) [Fri, 25 Sep 2020 17:17:35 +0000 (19:17 +0200)]
srt: Avoid removing invalid sockets from the polls

This would provoke error messages from SRT.

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

3 years agosrt: Fix use of srt_startup
Jan Alexander Steffens (heftig) [Fri, 25 Sep 2020 17:08:17 +0000 (19:08 +0200)]
srt: Fix use of srt_startup

`srt_startup` can also return 1 if it was successful. Avoid warning in
this case.

Avoid a race when checking whether we need to call it at all.

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

3 years agosrt: Fix parameter types used for socket options
Jan Alexander Steffens (heftig) [Tue, 6 Oct 2020 10:35:12 +0000 (12:35 +0200)]
srt: Fix parameter types used for socket options

The [SRT documentation][1] specifies exact types for the socket options.
Make sure we match these.

This reverts the linger workaround in commit 84f8dbd932029220ee86154dd
and extends srt_constant_params to support other types than int.

[1]: https://github.com/Haivision/srt/blob/master/docs/APISocketOptions.md

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

3 years agod3d11upload: Allow passthrough for system memory
Seungha Yang [Tue, 29 Sep 2020 09:52:43 +0000 (18:52 +0900)]
d3d11upload: Allow passthrough for system memory

... like how d3d11download and gl{upload,download} do.
This should've been part of the commit 9b72b04daddafb1c86cb6ab5923c593a70bc4166
but I missed.

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

3 years agova: allocator: refactor flush methods for both allocators
Víctor Manuel Jáquez Leal [Sun, 4 Oct 2020 08:01:31 +0000 (10:01 +0200)]
va: allocator: refactor flush methods for both allocators

Since the logic is the same, it can be generalized in a single common
function.

Also the methods run the common function with a lock and signal the
buffers' conditional.

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

3 years agova: allocator: refactor GstVaDmabufAllocator
Víctor Manuel Jáquez Leal [Sat, 3 Oct 2020 14:37:54 +0000 (16:37 +0200)]
va: allocator: refactor GstVaDmabufAllocator

Move code down to group it.

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

3 years agova: allocator: refactor GstVaBuffersurface
Víctor Manuel Jáquez Leal [Sat, 3 Oct 2020 14:30:14 +0000 (16:30 +0200)]
va: allocator: refactor GstVaBuffersurface

Move code up and add namespace to methods, and renaming
_creating_buffer_surface() to the canonical
gst_va_buffer_surface_new()

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

3 years agova: implement pooled allocators
Víctor Manuel Jáquez Leal [Wed, 30 Sep 2020 17:35:14 +0000 (19:35 +0200)]
va: implement pooled allocators

1. Allocators don't implement memory free() methods since all the memories will
   implement dispose() returning FALSE
2. Memory/miniobject dispose() will act as memory release, enqueueing the
   release memory
3. A new allocator's method prepare_buffer() which queries the released memory
   queue and will add the requiered memories to the buffer.
4. Allocators added a GCond to synchronize dispose() and prepare_buffer()
5. A new allocator's method flush() which will free for real the memories.

While the bufferpool will

1. Remove all the memories at reset_buffer()
2. Implement acquire_buffer() calling allocator's prepare_buffer()
3. Implement flush_start() calling allocator's flush()
4. start() is disabled since it pre-allocs buffers but also calls
   our reset_buffer() which will drop the memories and later the
   buffers are ditched, something we don't want. This approach avoids
   buffer pre-allocation.

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

3 years agova: allocator: user gst_clear_object() for _buffer_surface_unref()
Víctor Manuel Jáquez Leal [Wed, 30 Sep 2020 13:54:18 +0000 (15:54 +0200)]
va: allocator: user gst_clear_object() for _buffer_surface_unref()

Event if this function is only used by gst_va_dmabuf_memories_setup(), it might
get reused later by GstVaDmabufAllocator's functions. This change makes the
function less fragile.

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

3 years agova: allocator: renamed gst_va_dmabuf_memory_release()
Víctor Manuel Jáquez Leal [Wed, 30 Sep 2020 13:53:39 +0000 (15:53 +0200)]
va: allocator: renamed gst_va_dmabuf_memory_release()

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

3 years agova: allocator: renamed available_mems queue
Víctor Manuel Jáquez Leal [Wed, 30 Sep 2020 13:48:12 +0000 (15:48 +0200)]
va: allocator: renamed available_mems queue

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

3 years agova: allocator: rename gst_va_dmabuf_allocator_setup_buffer()
Víctor Manuel Jáquez Leal [Wed, 30 Sep 2020 13:45:54 +0000 (15:45 +0200)]
va: allocator: rename gst_va_dmabuf_allocator_setup_buffer()

Since it's related with GstVaDmabufAllocator.

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