Seungha Yang [Tue, 2 Mar 2021 12:10:24 +0000 (21:10 +0900)]
d3d11memory: Fix for wrong texture_array_size returns
Fix mismatched return values
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 12:13:18 +0000 (21:13 +0900)]
d3d11decoder: Add trace log for DPB pool size debugging
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 11:45:22 +0000 (20:45 +0900)]
d3d11decoder: Always use render-target bind flag for downstream pool
To convert decoded texture into other format, downstream would use
video processor instead of shader. In order for downstream to
be able to use video processor even if we copied decoded texture
into downstream pool, we should set this bind flag. Otherwise,
downstream would keep switching video processor and shader
to convert format which would result in inconsistent image quality.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 11:37:04 +0000 (20:37 +0900)]
d3d11: Fix wrong preprocessing blocks
Missed in https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/464
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
He Junyan [Mon, 1 Mar 2021 05:44:09 +0000 (13:44 +0800)]
va: vpp: fix a wrong caps logic in vpp_transform_caps().
The current gst_va_vpp_transform_caps return such as:
video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ],
interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA,
BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16,
16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive, format=(string)
{ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw,
width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive,
format=(string){ VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, I420, P010_10LE };
video/x-raw(memory:VAMemory), width=(int)[ 1,
2147483647 ], height=(int)[ 1,
2147483647 ],
interlace-mode=(string)progressive; video/x-raw(memory:DMABuf), width=(int)[ 1,
2147483647 ],
height=(int)[ 1,
2147483647 ], interlace-mode=(string)progressive; video/x-raw, width=(int)
[ 1,
2147483647 ], height=(int)[ 1,
2147483647 ], interlace-mode=(string)progressive
Which is not correct. It mixes the template caps and the input query caps together.
The correct way should be: clip the template caps with the input caps(remove format
and rangify size). The correct answer should be:
video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace
-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE,
ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16, 16384 ], height=(int)[ 16,
16384 ], interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA,
BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw, width=(int)[ 16, 16384 ], height=(int)[ 16,
16384 ], interlace-mode=(string)progressive, format=(string){ VUYA, GRAY8, NV12, NV21, YUY2,
UYVY, YV12, I420, P010_10LE }
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2045>
Jan Alexander Steffens (heftig) [Mon, 1 Mar 2021 15:23:37 +0000 (16:23 +0100)]
mpegtsparse: Fix switched DTS/PTS when set-timestamps=false
Fixes
30ee21eae36e7279f63b77167ba1dcf5f70b8e83.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2047>
Ilya Kreymer [Thu, 15 Aug 2019 15:25:26 +0000 (08:25 -0700)]
webrtc ice: Add 'min/max-rtp-port' props for setting RTP port range
default min port == 0, max port == 65535 -- if min port == 0, uses existing random port selection (range ignored)
add 'gathering_started' flag to avoid changing ports after gathering has started
validity checks: min port <= max port enforced, error thrown otherwise
include tests to ensure port range is being utilized (by @hhardy)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119>
Olivier Crête [Thu, 25 Feb 2021 16:58:57 +0000 (11:58 -0500)]
webrtc ice: Only ever request one component, it's always rtcpmux
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119>
Thibault Saunier [Fri, 26 Feb 2021 18:40:01 +0000 (15:40 -0300)]
transcoder: Add some missing API guards
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
Thibault Saunier [Fri, 26 Feb 2021 18:36:48 +0000 (15:36 -0300)]
transcoder: Fix potential use of uninitialized variables
gst_structure_get won't touch variables if the field is not present
leading to potential use of initialized vars
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
Thibault Saunier [Fri, 26 Feb 2021 18:31:29 +0000 (15:31 -0300)]
transcoder: Rework the API to create/get SignalAdapter
We can only have 1 single GstTranscoderSignalAdapter object for a
given GstTranscoder object, this enforces that by avoiding to expose
a constructor and instead add a method to GstTranscoder to get the
signal adapter (internally creating it when needed). We can still
cleanly ensure that the signal adapter is running for the requested
GMainContext and return NULL if it is not the case.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
Matthew Waters [Mon, 22 Feb 2021 05:59:25 +0000 (16:59 +1100)]
webrtcbin: use regular ice nomination by default
1. We don't currently deal with an a=ice-options in the SDP which means
we currently violate https://tools.ietf.org/html/rfc5245#section-8.1.1
which states: "If its peer is using ICE options (present in
an ice-options attribute from the peer) that the agent does not
understand, the agent MUST use a regular nomination algorithm."
2. The recommendation is default to regular nomination in both RFC5245
and RFC8445. libnice change for this is
https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/125
which requires an API break in libnice.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2031>
Philippe Normand [Wed, 24 Feb 2021 18:43:07 +0000 (18:43 +0000)]
transcoder: Remove un-needed gst_init call
We can safely assume GStreamer is already initialized from here.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
Thibault Saunier [Thu, 26 Nov 2020 01:25:28 +0000 (22:25 -0300)]
transcoder: Port to a GstBus API instead
Following the move made by GstPlayer in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/35
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
Thibault Saunier [Thu, 26 Nov 2020 01:21:35 +0000 (22:21 -0300)]
transcoder: Automatically generate enums GTypes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
Thibault Saunier [Thu, 26 Nov 2020 01:01:30 +0000 (22:01 -0300)]
transcoder: Port to G_DECLARE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
Sebastian Dröge [Fri, 26 Feb 2021 14:36:58 +0000 (16:36 +0200)]
decklinkvideosink: Use correct numerator for 29.97fps
It's not 0.2997fps.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2042>
Edward Hervey [Fri, 26 Feb 2021 10:39:10 +0000 (11:39 +0100)]
decklinksrc: Use a more accurate capture time
Use the hardware reference clock time when the frame was finished being captured
instead of a time much further down the road.
This improves the stability/accuracy of buffer times.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2040>
Víctor Manuel Jáquez Leal [Wed, 24 Feb 2021 18:14:42 +0000 (19:14 +0100)]
va: allocator: No need of fourcc to create surface.
In commits
430aa327 and
a119a940 there are a regression since it is
possible to create surfaces without fourcc, only chroma (rtformat) is
required.
This regression is shown on radeonsi driver with certain color
formats.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2035>
Víctor Manuel Jáquez Leal [Wed, 24 Feb 2021 12:06:51 +0000 (13:06 +0100)]
va: vpp: implement GstColorBalance interface
And modify multiple-vpp example to use it with -r parameter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>
Víctor Manuel Jáquez Leal [Tue, 23 Feb 2021 16:22:40 +0000 (17:22 +0100)]
va: filter: add controllable and mutable playing to GParamFlags
Add controllable and mutable playgin to common GParamFlags.
Also use this common flags to video-direction
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>
Víctor Manuel Jáquez Leal [Wed, 24 Feb 2021 15:57:06 +0000 (16:57 +0100)]
vulkan: Fix elements long name.
Fix vkcoloconvert and vkviewconvert long names.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2034>
Haihao Xiang [Tue, 12 Jan 2021 07:33:49 +0000 (15:33 +0800)]
msdk: allow user specify a drm device via an env variable
User may specify the required device via GST_MSDK_DRM_DEVICE
Example:
GST_MSDK_DRM_DEVICE=/dev/dri/card0 gst-launch-1.0 videotestsrc ! msdkh264enc
! fakesink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1953>
He Junyan [Tue, 19 Jan 2021 07:36:29 +0000 (15:36 +0800)]
VA: Add the vaav1dec element as the av1 decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
He Junyan [Tue, 19 Jan 2021 07:17:58 +0000 (15:17 +0800)]
VA: Add the aux surface for gst buffer used by decoder.
The AV1 codec needs to support the film grain feature. When the film
grain feature is enabled, we need two surfaces as the output of the
decoded picture, one without film grain effect and the other one with
it. The first one acts as the reference and is needed for later pictures'
reconstruction, and the second one is the real display output.
So we need to attach another aux surface to the gst buffer/mem and make
that aux surface as the target of vaBeginPicture.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
He Junyan [Tue, 19 Jan 2021 07:07:38 +0000 (15:07 +0800)]
VA: Add a helper function of decoder_add_slice_buffer_with_n_params.
Some codecs such as AV1 needs several parameters associated with one
slice. It may have multi tiles within one slice and each tile needs
its description parameter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
He Junyan [Tue, 19 Jan 2021 06:59:45 +0000 (14:59 +0800)]
codecs: AV1decoder: Add the AV1 decoder base class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
He Junyan [Tue, 23 Feb 2021 05:47:29 +0000 (13:47 +0800)]
va: allocator: replace assert with error log in va alloc.
We should print error log rather than assert when the forcc or
the rt_format of va allocator is unrecognized.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
Seungha Yang [Sun, 21 Feb 2021 08:38:38 +0000 (17:38 +0900)]
d3d11: Documentation update
* Update class metadata
* for wrapper bin elements to be distinguishable from internal element.
* D3D11 -> Direct3D11 for consistency
* Add missing Since mark everywhere
* Update plugin cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
Seungha Yang [Sun, 21 Feb 2021 11:38:37 +0000 (20:38 +0900)]
d3d11: Reorganize class hierarchy of convert elements
AS-IS:
D3D11Convert class is baseclass of D3D11ColorConvert and D3D11Scale
* GstD3D11Convert
|_ GstD3D11ColorConvert
|_ GstD3D11Scale
TO-BE:
Introducing a new base class for color conversion and/or rescale elements
* GstD3D11BaseConvert
|_ GstD3D11Convert
|_ GstD3D11ColorConvert
|_ GstD3D11Scale
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
Seungha Yang [Sun, 21 Feb 2021 08:35:40 +0000 (17:35 +0900)]
d3d11deinterlace: Add missing system memory caps features on templates
This element can support system memory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
Víctor Manuel Jáquez Leal [Thu, 18 Feb 2021 08:53:09 +0000 (09:53 +0100)]
va: filter, vpp: process colorimetry
A new filter method were added: gst_va_filter_set_formats(). In this
way the input & output GstVideoInfo are processed only once per stream
negotiation, and not per frame.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
Víctor Manuel Jáquez Leal [Thu, 18 Feb 2021 04:58:25 +0000 (05:58 +0100)]
va: filter: check if filter is open on set_orientation()
Because the method requires pipeline_caps is filled.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
Víctor Manuel Jáquez Leal [Wed, 17 Feb 2021 17:56:29 +0000 (18:56 +0100)]
va: filter: human readable background color
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
Víctor Manuel Jáquez Leal [Wed, 17 Feb 2021 17:55:14 +0000 (18:55 +0100)]
va: filter: fail immediately if vaBeginPicture() fails
There's no need to try vaRenderPicture() if vaBeginPicture() failed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
Víctor Manuel Jáquez Leal [Wed, 17 Feb 2021 17:30:10 +0000 (18:30 +0100)]
va: filter: destroy pipeline buffer after destroying filters
In
6ae24948 the pipeline buffer destroy were removing assuming it
wasn't required. Nonetheless, debugging the code it looks like a
buffer leak in iHD driver since the ID of the buffer kept increasing.
The difference now is that first the filter buffers are destroy first
and later the pipeline buffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
He Junyan [Fri, 19 Feb 2021 06:27:39 +0000 (14:27 +0800)]
va: vpp: Add raw buffer copy when needed.
Just like the decoder, the vapostproc also needs to copy the output
buffer to raw buffer if downstream elements only supports raw caps
and does not support the video meta.
The pipeline like:
gst-launch-1.0 filesrc location=xxxx ! h264parse ! vah264dec ! \
vapostproc ! capsfilter caps=video/x-raw,width=55,height=128 ! \
filesink location=xxx
needs this logic to dump the data correctly.
fixes: #1523
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2026>
Tim-Philipp Müller [Fri, 19 Feb 2021 00:03:00 +0000 (00:03 +0000)]
sdpsrc: fix double free if sdp is provided as string via the property
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1532
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2025>
Seungha Yang [Thu, 18 Feb 2021 12:38:37 +0000 (21:38 +0900)]
wasapi2device: Make wasapi2 device distinguishable from wasapi device
Both wasapi2 and wasapi plugins use WASAPI API. So "device.api=wasapi"
would make sense for the wasapi2 plugin as well. But people would be
confused by the identical "device.api=wasapi" property if intended
plugin is wasapi, not wasapi2. This change will make them distinguishable
by using "device.api" device property.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2024>
Seungha Yang [Tue, 12 Jan 2021 15:27:40 +0000 (00:27 +0900)]
wasapi2: Always build if Windows 10 SDK is available
Add support for building wasapi2 plugin if Windows 10 SDK is
available on system
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1951>
Stéphane Cerveau [Mon, 8 Feb 2021 11:24:58 +0000 (12:24 +0100)]
dtls: use GST_WARNING instead of g_warning
No need a g_warning which is failing always
with gst-inspect -a
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2010>
Michael Olbrich [Thu, 28 Jan 2021 11:28:03 +0000 (12:28 +0100)]
h264parse: don't invalidate the last PPS when parsing a new SPS
When a SPS is received then any previous PPS remains valid. So don't clear
the PPS flag from the parser state.
This is important because there are encoders that don't generated a PPS after
every SPS.
Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/571
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2019>
Vivia Nikolaidou [Wed, 17 Feb 2021 13:15:09 +0000 (15:15 +0200)]
h265parse: Detect height change on field-based interlaced files
The first time update_src_caps is called, there's no frame parsed yet,
therefore we don't know whether the file has alternate-field interlacing
mode. If we run it again after we have a frame, it might be that now we
have the SEI pic_struct parsed, and therefore we know that it's
field-based interlaced, and therefore the height must be multiplied by
two. Earlier on this was not detected as a change.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2022>
Víctor Manuel Jáquez Leal [Sat, 19 Sep 2020 19:39:06 +0000 (21:39 +0200)]
va: add multiple-vpp example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2015>
Víctor Manuel Jáquez Leal [Mon, 15 Feb 2021 14:54:11 +0000 (15:54 +0100)]
va: allocator: set workaround only for i965 driver
In commit
117453b9 a i965 driver workaround was added for all drivers, because
at that time we didn't have a driver implementation API.
Now there's one. This patch set the workaround only for the i965 driver.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2021>
Vivia Nikolaidou [Wed, 17 Feb 2021 11:46:03 +0000 (13:46 +0200)]
h265parse: Fix FPS/duration for interlaced files
There can be h265 files with frame-based, not field-based, interlacing.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2020>
Víctor Manuel Jáquez Leal [Fri, 12 Feb 2021 17:43:00 +0000 (18:43 +0100)]
va: allocator: MT-safe queue & dequeue dmabuf-based memories
One problem that va dmabuf allocator had is when preparing a buffer from
dmabuf memories in the allocator pool, specially when a buffer is composed by
several memories. This memories have to be by certain number and in certain
order.
This patch stores the number of memories and their address in order when a
dmabuf-based buffer is created and when preparing a buffer, it is reconstructed
with this info.
Finally, instead of pushing the memories as soon as they are unrefed, they are
hold until GstVaBufferSurface's ref_mems_count reaches zero (all the memories
related with that buffer/surface are unrefed). Until that happen, all the
memories are pushed back into the queue, locked, assuring that all the memories
related with a single buffer (with the same surface) remain contiguous, so the
buffer reconstruction is assured.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>
Víctor Manuel Jáquez Leal [Mon, 15 Feb 2021 14:34:56 +0000 (15:34 +0100)]
va: pool, allocator: free memories at bufferpool's stop()
This patch frees the memories in the allocator's pool after the bufferpool frees
all its buffers, sync'ing them at stop() vmethod.
By doing it, the current logic in flush_start() is not valid, so the vmethod is removed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>
Víctor Manuel Jáquez Leal [Fri, 12 Feb 2021 14:40:33 +0000 (15:40 +0100)]
va: allocator: remove unused public functions
Deleted the public functions:
gst_va_dmabuf_allocator_wait_for_memory()
gst_va_allocator_wait_for_memory()
And all the support for wait, cond in allocator's pool.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>
Víctor Manuel Jáquez Leal [Fri, 12 Feb 2021 12:26:24 +0000 (13:26 +0100)]
va: pool: simplify the logic
Instead of removing memories from buffers at reset_buffer()/release_buffer() the
bufferpool operation is kept as originally designed, still the allocator pool is
used too. Thus, this patch restores the buffer size configuration while removing
release_buffer(), reset_buffer() and acquire_buffer() vmethods overloads.
Then, when the bufferpool base class decides to discard a buffer, the VA
surface-based memory is returned to the allocator pool when its last reference
is freed, and later reused if a new buffer is allocated again.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>
Víctor Manuel Jáquez Leal [Sun, 7 Feb 2021 15:12:56 +0000 (16:12 +0100)]
va: pool: use allocator pool at alloc()
Check if the allocator pool has memories available before creating a
new one, but only iif pool is not starting.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>
Víctor Manuel Jáquez Leal [Mon, 8 Feb 2021 11:25:07 +0000 (12:25 +0100)]
va: allocator: log buffer at dmabuf setup and prepare
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>
Seungha Yang [Thu, 21 Jan 2021 15:10:28 +0000 (00:10 +0900)]
d3d11: Add support for deinterlacing by using ID3D11VideoProcessor interface
Add a new element d3d11deinterlace to support deinterlacing.
Similar to d3d11videosink and d3d11compositor, this element is
a wrapper bin of set of child elements including helpful
conversion elements (upload/download and color convert)
to make this element configurable between non-d3d11 elements.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2016>
Seungha Yang [Sat, 13 Feb 2021 21:23:55 +0000 (06:23 +0900)]
d3d11: Add a method for conversion from DXGI format to GstVideoFormat
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2016>
Mathieu Duponchelle [Fri, 22 Jan 2021 02:26:29 +0000 (03:26 +0100)]
h264parse: fix timestamping of interlaced fields in output
Instead of relying on GstBaseParse default behaviour of computing
the duration of a parsed buffer based on the framerate passed
to gst_base_parse_set_framerate(), we instead compute the duration
ourselves, as we have more information available.
In particular, this means we now output buffers with a duration
that matches that of raw interlaced buffers when each field is
output in a separate buffer.
This fixes DTS interpolation performed by GstBaseParse, as the
previous behaviour of outputting each field with the duration of
a full frame was messing up the base class calculations.
When not enough information is available, h264parse simply falls
back to calculating the duration based on the framerate and hope
for the best as was the case previously.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1973>
Seungha Yang [Sun, 14 Feb 2021 12:01:32 +0000 (21:01 +0900)]
d3d11decoder: Take account of min buffers of downstream buffer pool
Since our decoder DPB texture pool cannot be grown once it's
configured, we should pre-allocate sufficient number of textures
for zero-copy playback (but not too many).
The "min buffers" allocation query parameter can be a hint for
the number of required textures in addition to DPB size.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2017>
Thibault Saunier [Thu, 29 Oct 2020 13:54:45 +0000 (10:54 -0300)]
openh264enc: Add support for main and high profiles
Those are supported (to a certain extent) so we should not limit
ourself to baseline
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1789>
He Junyan [Thu, 11 Feb 2021 08:04:12 +0000 (16:04 +0800)]
codecs: mpeg2decoder: Move frame_unref to handle_frame.
In the current code, we call frame_unref only when the frame is
outputted. This is OK for normal playback, but when seek happens,
the frames stored in DPB is not outputted and causes some memory
leak.
The correct way is that we should call frame_unref every time we
finish the handle_frame(), which is also the behaviour of H264/H265
decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2014>
Seungha Yang [Sat, 6 Feb 2021 17:26:02 +0000 (02:26 +0900)]
d3d11h265dec: Add support for interlaced stream
Note that we have no D3D11 deinterlace element yet.
If downstream is not support format:Interlaced caps feature including all
D3D11 the other elements, aspect-ratio will be adjusted as an
alternative approach.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2008>
Seungha Yang [Sat, 6 Feb 2021 15:21:06 +0000 (00:21 +0900)]
codecs: h265decoder: Add support for interlaced stream
* Invoke GstH265DecoderClass::new_sequence() method per interlaced
stream status update so that subclass can update caps.
* Parse picture timing SEI and set buffer flags on GstH265Picture
object. Subclass can refer to it like that of our h264decoder
implementation.
* Remove pointless GstH265PictureField enum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2008>
Seungha Yang [Tue, 9 Feb 2021 15:59:05 +0000 (00:59 +0900)]
vah265dec: Don't need to pass picture structure to VA
This code came from gstvaapidecoder_h265 implementation
but picture structure is always GST_VAAPI_PICTURE_STRUCTURE_FRAME.
Moreover, in theory, VA doesn't need to know picture structure for
decoding HEVC stream.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2008>
Seungha Yang [Sat, 6 Feb 2021 13:02:59 +0000 (22:02 +0900)]
nvh265sldec: Remove pointless field picture parameter setup
HEVC has no decoding flow for interlaced, field picture referencing.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2008>
He Junyan [Sun, 7 Feb 2021 16:07:26 +0000 (00:07 +0800)]
va: vpp: Make the global lock only to DMA buffer's import.
The normal gst_va_buffer_get_surface does not need a global lock.
Too big lock may make the performance lower.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2009>
Víctor Manuel Jáquez Leal [Fri, 5 Feb 2021 13:05:53 +0000 (14:05 +0100)]
va: allocator: log dmabuf and surface at pool push or pop
In order to keep track of the dmabuf fds and surfaces numbers log messages are
added at memory_release() (queue push) and prepare_buffer() (queue pop).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1999>
Víctor Manuel Jáquez Leal [Tue, 2 Feb 2021 05:43:27 +0000 (06:43 +0100)]
va: h265dec: fix HVC1 stream format name
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1999>
Víctor Manuel Jáquez Leal [Mon, 1 Feb 2021 22:19:27 +0000 (23:19 +0100)]
va: basedec: refactor context query
Context query is handled either by source and sink queries. This patch
factors-out its handling in a common utility function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1999>
Víctor Manuel Jáquez Leal [Mon, 21 Dec 2020 17:10:44 +0000 (18:10 +0100)]
va: filter: use a common GParamFlags definition
Instead of repeating the same code along gst_va_filter_install_properties()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1999>
Víctor Manuel Jáquez Leal [Fri, 22 Jan 2021 15:54:05 +0000 (16:54 +0100)]
va: h264dec: remove spurious if validation
The first if checks for caps, thus else doesn't need to recheck for the
opposite.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1999>
Víctor Manuel Jáquez Leal [Fri, 5 Feb 2021 17:13:32 +0000 (18:13 +0100)]
va: vpp: fix frame copy
There were two problems with frame copy:
1. The input video info are from the format color, not form the allocated VA
surface, it's needed to update the sink video info according with the
allocator's data.
2. The parameters of `gst_video_frame_copy()` were backwards.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2007>
Víctor Manuel Jáquez Leal [Tue, 2 Feb 2021 17:05:46 +0000 (18:05 +0100)]
va: vpp: request video and alignment metas for src pool
This is for the pool used when importing raw video frames to surfaces.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2007>
Víctor Manuel Jáquez Leal [Thu, 4 Feb 2021 15:43:02 +0000 (16:43 +0100)]
va: vpp: transform_size() must return FALSE
transform_size() basetransform vmethod is used when there's no output buffer
pool and allocates a system memory buffer. With VA this cannot be allowed, since
it needs VASurfaces to process.
Thus transform_size() is not required, but to play safe let's return FALSE.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2007>
Víctor Manuel Jáquez Leal [Tue, 2 Feb 2021 15:22:34 +0000 (16:22 +0100)]
va: vpp: copy input buffer flags and timestamps
Strictly speaking right now it's not required do this copy, but let's play safe
and assume in the future this metadata might be required while doing the
postprocessing.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2007>
Víctor Manuel Jáquez Leal [Mon, 1 Feb 2021 22:55:11 +0000 (23:55 +0100)]
va: vpp: handle context query
Previously vapostproc didn't communicate its context through query mechanism,
which is required for context sharing. This patch completes this missing bits.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2007>
Víctor Manuel Jáquez Leal [Mon, 1 Feb 2021 22:50:12 +0000 (23:50 +0100)]
va: vpp: don't copy color, size or orientation video metas
If they are processed by the element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2007>
Víctor Manuel Jáquez Leal [Fri, 5 Feb 2021 15:46:00 +0000 (16:46 +0100)]
va: vpp: don't break passthrough if no color balance required
The function `_add_filter_cb_buffer()` returned TRUE if no color balance filter
are required, but that's is wrong, since it will break the passthrough. This
patch return FALSE which is the correct value for the situation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2007>
Víctor Manuel Jáquez Leal [Fri, 15 Jan 2021 13:07:19 +0000 (14:07 +0100)]
va: vpp: use gst_clear_caps()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2007>
Víctor Manuel Jáquez Leal [Tue, 2 Feb 2021 15:23:28 +0000 (16:23 +0100)]
va: filter: don't destroy pipeline buffer
This was only required by i915 driver before libva-2.0 because it didn't
conform.
Also changes the way _destroy_filters() is called, now inside a locked block, so
it must not lock in it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2006>
Víctor Manuel Jáquez Leal [Mon, 1 Feb 2021 15:57:49 +0000 (16:57 +0100)]
va: filter: lock member variables access
While gst_va_filter_open() and gst_va_filter_close() remain non-thread-safe, the
other API calls that modify member variables are locked.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2005>
Jakub Adam [Wed, 3 Feb 2021 22:39:00 +0000 (23:39 +0100)]
srt: preserve ABI compatibility
Reintroduce socket descriptor parameter removed in
327ad84e to
"caller-added" and "caller-removed" signals, just set it always to zero.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2004>
Seungha Yang [Wed, 3 Feb 2021 18:42:05 +0000 (03:42 +0900)]
d3d11decoder: Fix deadlock when DPB texture pool is full
Unlike other stateless decoder implementations (e.g., VA),
our DPB pool cannot be grown since we are using
texture array (pre-allocated, fixed-size d3d11 texture pool).
So, if there's no more available texture to use,
there's no way other than copying it to downstream's
d3d11 buffer pool. Otherwise deadlock will happen.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2003>
Seungha Yang [Tue, 2 Feb 2021 10:10:13 +0000 (19:10 +0900)]
d3d11memory: Add a method for querying texture array size
... and the number of textures in use.
Direct3D11 texture array is usually used for decoder DPB pool,
and d3d11 decoder elements might want to know
whether there's available texture resource or not.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2003>
Jakub Adam [Mon, 14 Dec 2020 19:34:15 +0000 (20:34 +0100)]
srt: don't pass SRT socket ID to "caller-added,removed" signals
The caller's IP and port is enough for unique identification. Don't leak
the socket handle since using it in unadvised libsrt calls from the
application could break the SRT element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1772>
Jakub Adam [Wed, 4 Nov 2020 16:14:03 +0000 (17:14 +0100)]
srtobject: add caller address to stats structure
In listener mode, gst_stats() returns an independent set of
statistics for every connected caller. Having the caller's IP and port
present in each structure allows to correlate the statistics with a
particular caller that has been announced by "caller-added" signal.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1772>
Vivia Nikolaidou [Wed, 3 Feb 2021 12:27:14 +0000 (14:27 +0200)]
h265parse: Support for alternate-field interlacing
Also don't set interlacing information on the caps, see #1313
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1996>
Jan Alexander Steffens (heftig) [Tue, 2 Feb 2021 17:25:31 +0000 (18:25 +0100)]
h264/h265parse: Add VideoTimeCodeMeta to the outgoing buffer
The parsers attempted to add the meta to the incoming buffer, which
might not be the outgoing buffer or may not have been writable yet.
To fix this, call `gst_buffer_make_writable` earlier and make sure to
use the `parse_buffer` to add the meta.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1521
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2002>
Haihao Xiang [Wed, 27 Jan 2021 07:32:26 +0000 (15:32 +0800)]
va: sort the device queue
If so, the elements will be registered per drm node in order of
renderD128, renderD129, ... etc, an element with constant name will be
registered on renderD128 on a hardware with multiple drm nodes.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1988>
Seungha Yang [Mon, 1 Feb 2021 19:33:09 +0000 (04:33 +0900)]
v4l2decoder: Small documentation fix
Fixing documentation even though those methods are v4l2codecs plugin internals
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2000>
Nicolas Dufresne [Fri, 29 Jan 2021 14:43:07 +0000 (09:43 -0500)]
v4l2codecs: h264: Enable 1 frame delay on non-live
When doing non-live decoding, enable 1 frame of delay. This will ensure
that we queue the next decoding job before we actually wait for the previous
to complete. This improves throughput notably on RK3399.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1881>
Nicolas Dufresne [Fri, 29 Jan 2021 14:41:22 +0000 (09:41 -0500)]
v4l2codecs: Add support for render delay
This add support for render delay in the decoder helper.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1881>
Nicolas Dufresne [Wed, 27 Jan 2021 20:55:43 +0000 (15:55 -0500)]
v4l2codecs: Coding style fix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1881>
Nicolas Dufresne [Wed, 27 Jan 2021 20:53:49 +0000 (15:53 -0500)]
v4l2codecs: Poll inside set_done()
This removes the need for the gst_v4l2_decoder_is_done() helper and
simplify slightly the subclass code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1881>
Nicolas Dufresne [Fri, 18 Dec 2020 21:36:16 +0000 (16:36 -0500)]
v4l2codecs: Make request structure ref-counted
This adds a non-thread safe refcount to the GstV4l2Request. This will
allow holding on more then one request in order to implement render
delay. This is made non-thread safe for speed as we know this will all
happen on the same streaming thread.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1881>
Nicolas Dufresne [Mon, 14 Dec 2020 22:07:01 +0000 (17:07 -0500)]
v4l2codecs: Rework handling of queues and pending requests
Starting from this patch, all queue and dequeue operation happening
on V4L2 is now abstracted with the request. Buffers are dequeued
automatically when pending requests are marked done and only 1 in-flight
request is now used.
Along with fixing issues with request not being reused with slice
decoders, this change reduces the memory footprint by allocating only
two bitstream buffers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1881>
Staz M [Fri, 29 Jan 2021 07:09:05 +0000 (02:09 -0500)]
decklink: Fixed decklinkvideosink auto format detection
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1994>
Seungha Yang [Wed, 27 Jan 2021 19:03:37 +0000 (04:03 +0900)]
nvh264sldec: Add support for output-delay to improve throughput performance
NVDEC API support delaying getting decoded output, and recommended
delay by API document is 4 frames. In case that throughput is
more critical factor than latency, we can prefer delayed output
as recommended by NVIDIA.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1925>
Seungha Yang [Tue, 29 Dec 2020 10:54:35 +0000 (19:54 +0900)]
codecs: h264decoder: Add support for output delay
Some decoding APIs support delayed output or a command for decoding
a frame doesn't need to be sequential to corresponding command for
getting decoded frame. For instance, subclass might be able to
request decoding for multiple frames and then get for one (oldest)
decoded frame or so.
If aforementioned case is supported by specific decoding API,
delayed output might show better throughput performance.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1925>
Arun Raghavan [Wed, 27 Jan 2021 22:09:07 +0000 (17:09 -0500)]
ldac: Use pkg-config instead of raw lib/header search
The ldacBT library includes pkg-config files for the standard and ABR
libraries, so let's just use that instead of doing a header/library
search.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1990>
Seungha Yang [Wed, 27 Jan 2021 17:02:28 +0000 (02:02 +0900)]
d3d11videosink: Don't limit max buffers of buffer pool
In some case, especially reverse playback, we would need more than
two buffers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1989>
Seungha Yang [Tue, 26 Jan 2021 19:34:13 +0000 (04:34 +0900)]
d3d11: Suppress some warning debug messages
* Don't warn for live object, since ID3D11Debug itself seems to be
holding refcount of ID3D11Device at the moment we called
ID3D11Debug::ReportLiveDeviceObjects(). It would report live object
always
* Device might not be able to support some formats (e.g., P010)
especially in case of WARP device. We don't need to warn about that.
* gst_d3d11_device_new() can be used for device enumeration. Don't warn
even if we cannot create D3D11 device with given adapter index therefore.
* Don't warn for HLSL compiler warning. It's just noise and
should not be critical thing at all
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1986>
Seungha Yang [Thu, 10 Dec 2020 20:23:20 +0000 (05:23 +0900)]
examples: Add d3d11videosink examples for shared-texture use cases
Add two examples to demonstrate "draw-on-shared-texture" use cases.
d3d11videosink will draw application's own texture without copy
by using:
- Enable "draw-on-shared-texture" property
- make use of "begin-draw" and "draw" signals
And then, application will render the shared application's texture
to swapchain's backbuffer by using
1) Direct3D11 APIs
2) Or, Direct3D9Ex + interop APIs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1873>