Marek Vasut [Fri, 11 Feb 2022 22:44:20 +0000 (23:44 +0100)]
jpegdec: Factor out gst_jpeg_turbo_parse_ext_fmt_convert()
Pull out peer caps checking code into gst_jpeg_turbo_parse_ext_fmt_convert().
This code is used by libjpeg-turbo extras to determine whether peer is capable
of handling buffers into which libjpeg-turbo can directly decode data. This
kind of check must be performed before jpeg_start_decompress() is called in
gst_jpeg_dec_prepare_decode() as well as in gst_jpeg_dec_negotiate(), hence
the common code.
This commit does modify the code a little to make it easier to call from both
call sites without much duplication, hence the extra `if (*clrspc)` test.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1687>
Marek Vasut [Fri, 11 Feb 2022 22:29:27 +0000 (23:29 +0100)]
Revert "jpegdec: only allow conversions from RGB"
This reverts commit
2aa2477208c029b0e1b8232d69f4f99a3bf1d473.
The commit is completely wrong, libjpeg-turbo is perfectly capable
of decoding I420 (YUV) to RGB. The test case provided alongside the
aforementioned commit passes without this revert because it decodes
image of JCS_YCrCb color space, so the new `if (clrspc == JCS_RGB)`
condition is false on that image, and the libjpeg-turbo decoding
does not get used. The real bug is hidden by that commit.
The real problem is in the call order of gst_jpeg_dec_prepare_decode()
and gst_jpeg_dec_negotiate(). The gst_jpeg_dec_prepare_decode() calls
jpeg_start_decompress() which sets up internal state of the libjpeg,
however, neither cinfo.out_color_space nor cinfo.raw_data_out are
set correctly yet. Those two are set up in gst_jpeg_dec_negotiate()
which is called a bit later. Therefore, the real fix is the set up
cinfo.out_color_space and cinfo.raw_data_out before calling
jpeg_start_decompress(). This is however a separate patch.
Fixes:
2aa2477208 ("jpegdec: only allow conversions from RGB")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1687>
He Junyan [Sat, 12 Feb 2022 06:51:51 +0000 (14:51 +0800)]
vavpp: Fix the caps leak in the transform_caps() function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1689>
Seungha Yang [Fri, 11 Feb 2022 15:51:56 +0000 (00:51 +0900)]
meson: d3d11: Remove d3d11 option check from gst-libs
Build gstd3d11-1.0 unconditionally for d3d11 implementation can be used
by non-d3d11 plugins even when d3d11 plugin is disabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1684>
Seungha Yang [Thu, 10 Feb 2022 13:31:06 +0000 (22:31 +0900)]
d3d11: Update build-time dependency
Remove all the d3d11 and dxgi header version dependent ifdef
and bump the minimum requirement to d3d11_4.h and dxgi1_6.h.
We are already failing support old Visual Studio (Windows SDK actually)
such as Visual Studio 2015. Note that our MinGW toolchain satisfies
the requirement.
From runtime point of view, this change should be fine since
we are checking OS version with IUnknown::QueryInterface()
everywhere in order to check API availability
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1684>
Seungha Yang [Fri, 7 Jan 2022 11:02:46 +0000 (20:02 +0900)]
videoaggregator: Fix for unhandled negative rate
Nagative rates have been considered only in
gst_video_aggregator_advance_on_timeout(). Update other places
to fix broken reverse playback.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1500>
Seungha Yang [Wed, 25 Aug 2021 11:18:20 +0000 (20:18 +0900)]
typefindfunctions: Fix WebVTT format detection
If WebVTT file consists of "WebVTT" header without body,
the file size can be smaller than 10 bytes.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1359>
Vivienne Watermeier [Mon, 31 Jan 2022 12:01:10 +0000 (13:01 +0100)]
navigation: add more constructors for navigation events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1610>
He Junyan [Sat, 8 May 2021 09:54:34 +0000 (17:54 +0800)]
MSDK: Import VA surface as encoder's input.
We make all MSDK encoders declare "memory:VAMemory" feature. Then
the pipeline such as:
gst-launch-1.0 -vf filesrc location=xxx.h264 ! h264parse ! \
vah264dec ! msdkh265enc ! fakesink
will choose VA memory caps between the VA decoder and MSDK encoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Sat, 8 May 2021 09:26:27 +0000 (17:26 +0800)]
MSDK: Add helper function to peek VA surface of VA kind gstbuffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Sat, 8 May 2021 07:51:11 +0000 (15:51 +0800)]
MSDK: Handle context query into the encoder's query function.
The MSDK encoder's query function is not set and it just forwards
all query to its base class. We now need to answer the context
query correctly. Other VA plugins need to query the VA display.
By the way, the current query of "gst.msdk.Context" is also missing.
The other MSDK elements must depend on the bin's context message(
sent in context_propagate()) to set their MsdkContext correctly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Tue, 17 Aug 2021 14:36:59 +0000 (22:36 +0800)]
MSDK: Handle context query into the VPP's query function.
The MSDK VPP's query function is not set and it just forwards
all query to its base class. We now need to answer the context
query correctly. Other VA plugins need to query the VA display.
By the way, the current query of "gst.msdk.Context" is also missing.
The other MSDK elements must depend on the bin's context message(
sent in context_propagate()) to set their MsdkContext correctly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Tue, 17 Aug 2021 14:34:43 +0000 (22:34 +0800)]
MSDK: Handle context query into the decoder's query function.
The MSDK decoder's query function is not set and it just forwards
all query to its base class. We now need to answer the context
query correctly. Other VA plugins need to query the VA display.
By the way, the current query of "gst.msdk.Context" is also missing.
The other MSDK elements must depend on the bin's context message(
sent in context_propagate()) to set their MsdkContext correctly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Tue, 17 Aug 2021 14:33:18 +0000 (22:33 +0800)]
MSDK: Add a handle_context_query() helper function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Tue, 17 Aug 2021 13:51:58 +0000 (21:51 +0800)]
MSDK: Improve the GstContext setting logic.
We now can use the gst va lib's display to create our MSDK context,
and use its helper functions to simplify our code. The improved logic
is like this:
1. Every MSDK element should use gst_msdk_context_find() to find a MSDK
context from neighbour. If valid, reuse it.
2. Use gst_msdk_ensure_new_context(). It will first query neighbours
about the GstVaDisplay, if found(e.g. some VA element is connected),
use gst_msdk_context_from_external_display() to create a MSDK context.
3. Then, creating the MSDK context from scratch. It creates both the
display and MSDK context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Sat, 8 May 2021 05:49:23 +0000 (13:49 +0800)]
MSDK: Add new_with_va_display() helper function to create context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Sat, 8 May 2021 03:44:57 +0000 (11:44 +0800)]
MSDK: Use the VA display object to replace the raw display handle.
The VA display object from VA lib is a common defined object. which
contain the whole display things. It is easier to use, and more important,
we can share it with the other VA plugins and keep all the VA related
plugins working on the same GPU device.
We also delete the useless gst_msdk_context_get_fd() API.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Fri, 11 Feb 2022 03:11:03 +0000 (11:11 +0800)]
MSDK: Add the gst va lib into MSDK's dependency.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1087>
He Junyan [Thu, 10 Feb 2022 04:52:30 +0000 (12:52 +0800)]
av1parse: Add temporal unit check when TD is absent.
The current manner for deciding the new temporal unit is based on
temporal delimiter(TD) OBU. We only start a new temporal unit when
the TD comes.
But some streams do not have TD at all, which makes the output "TU"
alignment fail to work. We now add check based on the relationship
between the different layers and it can successfully judge the TU edge.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1634>
He Junyan [Fri, 4 Feb 2022 09:12:15 +0000 (17:12 +0800)]
av1parse: let the parse continue when MISSING_OBU_REFERENCE error.
Some streams may have verbose OBUs before a valid sequence header. We
should let the parse continue rather than return a error.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1634>
He Junyan [Fri, 4 Feb 2022 03:40:18 +0000 (11:40 +0800)]
av1parse: Continue when we fail to detect the alignment.
Some streams may have problematic OBUs at the beginning, which causes
the parse fail to detect the alignment and return error. For example,
there may be verbose OBUs before a valid sequence, which should be
discarded until we meet a valid sequence. We should let the parse
continue when we meet such cases, rather than just return error.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1634>
Bastien Nocera [Tue, 1 Feb 2022 13:28:24 +0000 (14:28 +0100)]
gtk: Fix rotation not being applied when paused
The video wouldn't be redrawn immediately when a rotation was applied
but the pipeline was paused, as no new buffers were scheduled to be
displayed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1618>
Bastien Nocera [Tue, 1 Feb 2022 13:26:02 +0000 (14:26 +0100)]
gtk: Add a way to queue redrawing the base GTK widget
This will be used to request a redraw of the GTK widget should the
display be changed using properties not directly handled by the base GTK
widget, but by one of its descendants.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1618>
Seungha Yang [Tue, 30 Mar 2021 10:23:12 +0000 (19:23 +0900)]
ivfparse: Don't set zero resolution on caps
It could be zero if the information is not available at ivfparse
side, or not implemented. In that case, simply don't set
width/height on caps, otherwise downstream would be confused
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1649>
Seungha Yang [Fri, 28 Jan 2022 16:52:26 +0000 (01:52 +0900)]
mediafoundation: Add support for MP3 decoding
See also
https://docs.microsoft.com/en-us/windows/win32/medfound/windows-media-mp3-decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
Seungha Yang [Wed, 26 Jan 2022 17:20:37 +0000 (02:20 +0900)]
mediafoundation: Add support for AAC decoding
See also
https://docs.microsoft.com/en-us/windows/win32/medfound/aac-decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
Seungha Yang [Thu, 27 Jan 2022 16:45:30 +0000 (01:45 +0900)]
mediafoundation: Cosmetic changes
Rename baseclass to be consistent with other Windows plugins
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
Seungha Yang [Wed, 26 Jan 2022 17:26:02 +0000 (02:26 +0900)]
mediafoundation: Use & operator instead of GetAddressOf()
Use shorter expression
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
Seungha Yang [Sun, 23 Jan 2022 17:41:29 +0000 (02:41 +0900)]
mediafoundation: Port to C++
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1596>
Seungha Yang [Tue, 8 Feb 2022 18:27:41 +0000 (03:27 +0900)]
d3d11decoder: Promote rank to primary except for mpeg2
Our D3D11/DXVA codecs implementation has been verified
during 1.18 and 1.20 development cycle and also via the Fluster
test framework. Similar to the case of nvdec and vtdec,
we can prefer hardware over software in most cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1672>
Stéphane Cerveau [Thu, 10 Feb 2022 09:13:27 +0000 (10:13 +0100)]
ges: add missing plugin summary
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1682>
David Svensson Fors [Mon, 7 Feb 2022 08:30:58 +0000 (09:30 +0100)]
codec-utils: Avoid out-of-bounds error
For artificial input (in unit tests), all six bytes of
constraint_indicator_flags in hevc_caps_get_mime_codec() can be
zero. Add a guard against an out-of-bounds error that occurred in that
case. Change variables to signed int so comparison with -1 works.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1677>
Nicolas Dufresne [Wed, 9 Feb 2022 20:05:14 +0000 (15:05 -0500)]
v4l2codecs: vp9: Fix duplicating a duplicated picture
Duplicating a picture what was already a dup was leading to a crash. Rename
the custom picture flags as HOLDS_BUFFER to make its meaning clear. Then save
then ref and store the picture as userdata, so it can be obtained when
duplicating. Finally, mark the doplicated as HOLDS_BUFFER to avoid thinking it
holds a request.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1681>
Seungha Yang [Wed, 9 Feb 2022 16:48:23 +0000 (01:48 +0900)]
mfaudioenc: Handle empty IMFMediaBuffer
IMFMediaBuffer may not hold encoded data, which seems to happen
while draining.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1679>
Jan Schmidt [Fri, 17 Jul 2020 04:37:14 +0000 (14:37 +1000)]
videotestsrc: Don't re-render every frame when it's not needed.
When the pattern being rendered by videotestsrc doesn't have motion,
cache a rendered buffer and output it repeatedly with updated
metadata.
Based on a patch by Edward Hervey <edward@centricular.com>
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/10
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1293>
Víctor Manuel Jáquez Leal [Thu, 3 Feb 2022 09:10:44 +0000 (10:10 +0100)]
va: decoder: Log profile name.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1675>
Víctor Manuel Jáquez Leal [Mon, 24 Jan 2022 15:25:18 +0000 (16:25 +0100)]
va: filter: Log the added filter name.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1675>
Víctor Manuel Jáquez Leal [Mon, 25 Oct 2021 11:41:49 +0000 (13:41 +0200)]
vapostproc: Process HDR caps
This patch adds a new parameter: hdr-tone-mapping (same as
vaapipostproc), if the HDR capabilites are availabe in driver, and
it's disabled by default.
If hdr-tone-mapping is enabled then HDR fields in sink caps are
processed in frames from HDR to SDR, removing those hdr fields in
source pad caps too.
hdr-tone-mapping is not enabled if a color conversion is also
requested, since it fails to process in the iHD driver, so far.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1258>
Víctor Manuel Jáquez Leal [Thu, 30 Sep 2021 15:42:19 +0000 (17:42 +0200)]
build: Add libva dependency fallback.
Then libva can be subproject and used by either gstreamer-vaapi,
va and msdk in gst-plugins-bad.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1397>
Sangchul Lee [Sun, 6 Feb 2022 14:20:32 +0000 (23:20 +0900)]
webrtcice: Fix memory leaks in gst_webrtc_ice_add_candidate()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1646>
Nicolas Dufresne [Fri, 28 Jan 2022 19:49:42 +0000 (14:49 -0500)]
v4l2codecs: vp9: Make compressed hdr control optional
This is to supported by Mediatek VP9 driver. Mediatek handles
the forward probabilities in hardware hence does not need and
does not implement support for
V4L2_CID_STATELESS_VP9_COMPRESSED_HDR.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1600>
Krystian Wojtas [Wed, 1 Dec 2021 08:27:12 +0000 (09:27 +0100)]
tutorials: vdpau is ababdoned
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/828
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1671>
Tim-Philipp Müller [Tue, 8 Feb 2022 18:15:34 +0000 (18:15 +0000)]
tutorials: proper links description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1670>
Krystian Wojtas [Wed, 1 Dec 2021 08:20:24 +0000 (09:20 +0100)]
tutorials: links to monorepo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1670>
Krystian Wojtas [Tue, 8 Feb 2022 17:43:36 +0000 (18:43 +0100)]
tutorials: fixed described log level number to correspond with code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1669>
Krystian Wojtas [Wed, 1 Dec 2021 07:45:14 +0000 (08:45 +0100)]
tutorials: fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1669>
Krystian Wojtas [Wed, 1 Dec 2021 07:45:09 +0000 (08:45 +0100)]
tutorials: word hardware instead of h character
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1669>
Thibault Saunier [Wed, 22 Dec 2021 18:46:44 +0000 (18:46 +0000)]
navigation: Fix Since marker for mouse scroll
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1665>
Matthew Waters [Tue, 8 Feb 2022 01:58:52 +0000 (12:58 +1100)]
registry: enable relocatable builds for anywhere with dladdr()
Such as Linux/BSD's.
Matches the Windows/macOS behaviour.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1662>
Víctor Manuel Jáquez Leal [Mon, 7 Feb 2022 11:34:53 +0000 (12:34 +0100)]
va: Fix and simplify build recipe.
1. Use api_version variable rather than static string.
2. Remove pkgconfig generation since currently the library
is not installed, only used internally.
3. Rely on dependency "required" to abort compilation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1650>
Víctor Manuel Jáquez Leal [Mon, 7 Feb 2022 10:27:57 +0000 (11:27 +0100)]
va: Remove libgudev crumbs in library.
In commit
e699aaeb we moved linking of libgudev to the plugin rather
the library, because it's only used in the plugin. But the dependency
check is still done in library.
This patch removes the dependency check in library, and updates the
dependency check in plugin.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1650>
Jose Quaresma [Wed, 8 Dec 2021 22:13:15 +0000 (22:13 +0000)]
gstpluginloader: show the reason when spawning of gst-plugin-scanner fail
This fix helps in cross compiling when the meson tests runs using a qemu wraper
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1578>
Seungha Yang [Wed, 2 Feb 2022 16:04:40 +0000 (01:04 +0900)]
video-color: Fix for missing clipping in PQ EOTF function
* Add missing clipping in EOTF
* Use pre-calculated values
* Update variable names to specification's defined ones
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1629>
Robert Rosengren [Tue, 18 Jan 2022 16:53:30 +0000 (17:53 +0100)]
rtpbin: Safer ts-offset-smoothing-factor calculation
Protect the ts-offset-smoothing-factor calculation from overflow. Output
warning and fallback to ts-offset if it is detected.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1409>
Robert Rosengren [Tue, 23 Nov 2021 08:03:28 +0000 (09:03 +0100)]
rtpbin: add ts-offset-smoothing-factor property
Add property to set the TS offset smoothing factor and set default value
to not use it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1409>
Danny Smith [Tue, 26 Feb 2019 15:39:55 +0000 (16:39 +0100)]
rtpbin: applied smoothing to jittery sender time-stamps
Applying a moving average filter to the timestamp offsets
for smoothing jittery and preventing aggressive skew handling.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1409>
Danny Smith [Tue, 29 May 2018 14:24:02 +0000 (16:24 +0200)]
rtpbin: added option for setting min_ts_offset in ntp-sync mode
Constantly updating the ts_offset results in audiable glitches
when streaming audio using ntp-sync=true. By requiring a minimum
offset before updating ts_offset this can be mitigated. Added a
parameter which can be used to set min_ts_offset in ntp-sync mode.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1409>
Seungha Yang [Mon, 7 Feb 2022 19:51:24 +0000 (04:51 +0900)]
msdk: Fix for MFXUnload symbol re-definition build error
Fix for libgstreamer-full build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
Seungha Yang [Fri, 24 Dec 2021 15:13:04 +0000 (00:13 +0900)]
qsv: Add support for HEVC encoding
main and main-10 profiles are supported for now
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
Seungha Yang [Sun, 19 Dec 2021 12:39:53 +0000 (21:39 +0900)]
qsv: Add support for VP9 encoding and more video formats
Add VP9 encoder with 4:2:0 8 bits and 4:4:4 8/10 bits formats support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
Seungha Yang [Sun, 6 Feb 2022 12:34:43 +0000 (21:34 +0900)]
qsv: Introduce H.264 Intel Quick Sync Video Encoder
A new implementation of Intel Quick Sync Video plugin.
This plugin supports both Windows and Linux but optimization for
VA/DMABuf is not implemented yet.
This new plugin has some notable differences compared with existing
MSDK plugin.
* Encoder will expose formats which can be natively supported
without internal conversion. This will make encoder
control/negotiation flow much simpler and cleaner than
that of MSDK plugin.
* This plugin includes QSV specific library loading helper,
called dispatcher, with QSV SDK headers as a part of this plugin.
So, there will be no more SDK version dependent #ifdef in the code
and also there will be no more build-time MSDK/oneVPL SDK
dependency.
* Memory allocator interop between GStreamer and QSV is re-designed
and decoupled. Instead of implementing QSV specific allocator/bufferpool,
this plugin will make use of generic GStreamer memory
allocator/bufferpool (e.g., GstD3D11Allocator and GstD3D11BufferPool).
Specifically, GstQsvAllocator object will help interop between
GstMemory and mfxFrameAllocator memory abstraction layers.
Note that because of the design decision, VA/DMABuf support is not made
as a part of this initial commit. We can add the optimization for Linux
later once GstVA library exposes allocator/bufferpool implementation as
an API like GstD3D11.
* Initial encoder implementation supports interop with GstD3D11
infrastructure, including zero-copy encoding with upstream D3D11 element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
Seungha Yang [Wed, 1 Dec 2021 13:18:42 +0000 (22:18 +0900)]
qsv: Remove unnecessary pargma message
We know what we are doing, just remove noisy build warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
Seungha Yang [Wed, 1 Dec 2021 13:18:04 +0000 (22:18 +0900)]
qsv: Import libmfx API and dispatch code from oneVPL project
Copied from oneVPL project (https://github.com/oneapi-src/oneVPL)
v2022.0.3 tag at the commit of
efc259f8b7ee5c334bca1a904a503186038bbbdd
This is corresponding to MFX API version 2.6
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
Seungha Yang [Tue, 7 Dec 2021 12:29:05 +0000 (21:29 +0900)]
d3d11memory: Inform subresource index via GstMapInfo::user_data
By using this way, caller does not need to call another method
gst_d3d11_memory_get_subresource_index()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
Seungha Yang [Sun, 6 Feb 2022 12:36:28 +0000 (21:36 +0900)]
d3d11memory: Add support for ID3D11Buffer
Allow wrap ID3D11Buffer via GstD3D11Memory object
At the moment, only staging ID3D11Buffer is supported.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
Martin Reboredo [Fri, 22 Oct 2021 21:40:07 +0000 (18:40 -0300)]
gstvalue: De/Serialization of GBytes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1232>
Sebastian Mueller [Tue, 8 Feb 2022 05:24:13 +0000 (16:24 +1100)]
context: fix transfer annotation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1663>
Zebediah Figura [Tue, 18 Feb 2020 03:50:54 +0000 (21:50 -0600)]
baseparse: Don't truncate the duration to milliseconds in gst_base_parse_convert_default().
There's no need to do this, and it can make seeking far less accurate.
For a specific use case: I am working with a long (45-minute) MPEG-1 layer 3 file, which has a constant bit rate but no seeking tables. Trying to seek the pipeline immediately after pausing it, without the ACCURATE flag, to a location 41 minutes in, yields a location that is potentially over ten seconds ahead of where it should be. This patch improves that drastically.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/374>
Zebediah Figura [Tue, 8 Feb 2022 01:33:31 +0000 (19:33 -0600)]
baseparse: Trace time with GST_TIME_FORAMT in gst_base_parse_convert_default().
Be consistent with how we trace time in general.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/374>
Sebastian Dröge [Mon, 7 Feb 2022 07:46:46 +0000 (09:46 +0200)]
bufferpool: Deactivate pool and get rid of references to other objects from dispose instead of finalize
During dispose the pool will still have a reference count of 1 and all
API on it can still be safely called.
Subclasses will have already freed their own data before finalize is
called but would nonetheless be called into again via the pool
deactivation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1645>
Seungha Yang [Mon, 31 Jan 2022 15:50:53 +0000 (00:50 +0900)]
nvh265sldec: Fix for decoding 12bits stream
We've been exposing main-444-12 profile as a supported profile
in its sinkpad template but not actaully. Adding code to
covert 12 and 16 bits as well.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1612>
Seungha Yang [Mon, 31 Jan 2022 15:12:06 +0000 (00:12 +0900)]
nvdecoder: Fix for HEVC 4:4:4 format decoding
Map chroma_format_idc == 3 (which means 4:4:4 subsampling) correctly,
also pass coded bitdepth for decoder initialization instead of
inferring it from output format since they can be different.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/949
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1612>
Seungha Yang [Mon, 7 Feb 2022 13:38:02 +0000 (22:38 +0900)]
d3d11stagingbufferpool: Fix typo in texture description
Fixing typo, it should be height
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1652>
He Junyan [Wed, 27 Oct 2021 03:08:39 +0000 (11:08 +0800)]
va: Add a gstva.h to include all va lib header files.
And replacing all va lib headers with this new header files
when including.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1256>
He Junyan [Thu, 7 Oct 2021 06:31:28 +0000 (14:31 +0800)]
va: Move the vautils into the gst va lib.
The context query and handle are common logic for all va related
elements. So we move it from va plugins to the common gst va lib.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1256>
Matthew Waters [Mon, 7 Feb 2022 05:51:25 +0000 (16:51 +1100)]
pluginloader: support multiple subdirectories for GST_PLUGIN_SUBDIR (libdir)
i.e. if GST_PLUGIN_SUBDIR is 'some/lib/path', then the default plugin
loading assumed that there was only 'lib' as it only went up a single
directory to then find the plugin scanner.
Fix to support multiple subdirectories for GST_PLUGIN_SUBDIR (libdir).
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/995
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1644>
Matthew Waters [Mon, 7 Feb 2022 05:36:13 +0000 (16:36 +1100)]
registry: check the value of dladdr()
info.dli_fname could be NULL.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/994
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1644>
Matthew Waters [Mon, 7 Feb 2022 05:33:03 +0000 (16:33 +1100)]
registry: check the return value of g_win32_get_package_installation_directory_of_module()
g_win32_get_package_installation_directory_of_module() may return NULL
in some circumstances and we need to deal with that.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/996
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1644>
Matthew Waters [Wed, 2 Feb 2022 02:36:41 +0000 (13:36 +1100)]
examples/docs: update android applications to the latest relevant sdk's and build tools
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1622>
Seungha Yang [Sun, 24 Oct 2021 13:07:38 +0000 (22:07 +0900)]
codecs: Stop claiming constness for refcounted object
It's almost pointless and makes little sense as subclass might
want to modify refcount of the object or so. And all subclasses
are already casting them to non-const version as well.
In a general sense, we need to avoid passing refcounted object
with const qualifier.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1238>
Seungha Yang [Sat, 5 Feb 2022 16:06:36 +0000 (01:06 +0900)]
d3d11videosink: Use staging buffer pool for non-d3d11 upstream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1643>
Seungha Yang [Sat, 5 Feb 2022 15:53:34 +0000 (00:53 +0900)]
d3d11upload,d3d11download: Use staging buffer pool
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1643>
Seungha Yang [Sat, 5 Feb 2022 14:25:12 +0000 (23:25 +0900)]
d3d11decoder: Use staging buffer pool for non-d3d11 downstream
In specific condition, this can show about 10% ~ 30%
performance gain with non-d3d11 downstream element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1643>
Seungha Yang [Sat, 5 Feb 2022 14:08:48 +0000 (23:08 +0900)]
d3d11: Add new buffer pool implementation for staging texture
staging buffer pool will allocate staging d3d11 texture
for upload/download optimization. By using staging buffer,
we can avoid per frame staging -> system memory copy operation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1643>
Martin Reboredo [Wed, 2 Feb 2022 03:15:34 +0000 (00:15 -0300)]
gstvulkan: Expose gst_vulkan_result_to_string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1623>
Igor V. Kovalenko [Sat, 5 Feb 2022 14:36:41 +0000 (17:36 +0300)]
qroverlay: move to plugins that need external deps
qroverlay requires libqrencode dependency, move it next to similar plugins.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1642>
Nirbheek Chauhan [Sat, 5 Feb 2022 03:46:49 +0000 (09:16 +0530)]
ci: Trigger all jobs on gitlab CI script changes
Also fix typo in trigger variable that was causing triggered cerbero
pipelines to run deps builds and upload cache.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1641>
Tim-Philipp Müller [Fri, 4 Feb 2022 11:15:47 +0000 (11:15 +0000)]
Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1635>
Nirbheek Chauhan [Fri, 4 Feb 2022 14:49:57 +0000 (20:19 +0530)]
ci: Add a variable to identify triggered cerbero pipelines
This commit is required for proper functioning of the following
cerbero merge request: https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/800
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1638>
Tim-Philipp Müller [Thu, 3 Feb 2022 19:53:25 +0000 (19:53 +0000)]
Release 1.20.0
Tim-Philipp Müller [Thu, 3 Feb 2022 19:53:18 +0000 (19:53 +0000)]
Update ChangeLogs for 1.20.0
Tim-Philipp Müller [Thu, 3 Feb 2022 18:18:03 +0000 (18:18 +0000)]
video: fix up GstVideoOrientationMethod type registration
... in order to make older g-i happy (~1.60) which doesn't like
freeform descriptions in the value_name field. Which in turn
then makes hotdoc happy instead of erroring out when we bump
the symbol index version.
We usually only (ab)use the name field for description strings
for private plugin enums, not for public API visible to bindings.
This lets glib-mkenum generate the _get_type() function for the
enum again, which in turn will generate the expected value names
to match the enums.
We might be able to add this back later once we can upgrade the
g-i version requirement (and the documentation job image).
This reverts most of commit
b0aab48cdcf0a454d14aeb4d907209d8ee3f1add
Matthew Waters [Wed, 2 Feb 2022 07:06:49 +0000 (18:06 +1100)]
registry/macos: retrieve plugins relative to location of libgstreamer.dylib
Provides a relocatable directory structure for running GStreamer
applications as used in GStreamer.framework.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1627>
Stéphane Cerveau [Wed, 2 Feb 2022 08:58:15 +0000 (09:58 +0100)]
dashsink: doc cleanup
Remove max-files mention in the command line test
Fix some typos
Use mpegtsdemux instead of tsdemux in the pipeline description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1624>
Alistair Martin [Tue, 1 Feb 2022 14:51:23 +0000 (14:51 +0000)]
Incl resample in CustomData, tutorial 3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1619>
Jeremy Cline [Sun, 21 Nov 2021 22:52:48 +0000 (17:52 -0500)]
tagdemux: Fix crash when presented with malformed files
There's a race condition in gsttagdemux.c between typefinding and the
end-of-stream event. If TYPE_FIND_MAX_SIZE is exceeded,
demux->priv->collect is set to NULL and an error is returned. However,
the end-of-stream event causes one last attempt at typefinding to occur.
This leads to gst_tag_demux_trim_buffer() being called with the NULL
demux->priv->collect buffer which it attempts to dereference, resulting
in a segfault.
The malicious MP3 can be created by:
printf "\x49\x44\x33\x04\x00\x00\x00\x00\x00\x00%s", \
"$(dd if=/dev/urandom bs=1K count=200)" > malicious.mp3
This creates a valid ID3 header which gets us as far as typefinding. The
crash can then be reproduced with the following pipeline:
gst-launch-1.0 -e filesrc location=malicious.mp3 ! queue ! decodebin ! audioconvert ! vorbisenc ! oggmux ! filesink location=malicious.ogg
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/967
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1620>
Seungha Yang [Mon, 31 Jan 2022 15:18:44 +0000 (00:18 +0900)]
nvdecoder: Fix for display resolution setup
Display resolution should be cropped rect, not coded resolution.
Otherwise decoded output from NVDEC might be wrong.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1617>
Nirbheek Chauhan [Mon, 31 Jan 2022 21:30:41 +0000 (03:00 +0530)]
applemedia: Disable 64RGBALE support on older macOS
The kCVPixelFormatType_64RGBALE enum is only available on macOS Big
Sur (11.3) and newer. We also cannot use that while configuring the
encoder or decoder on older macOS.
Define the symbol unconditionally, but only use it when we're running
on Big Sur with __builtin_available().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1613>
Nirbheek Chauhan [Mon, 31 Jan 2022 21:34:32 +0000 (03:04 +0530)]
applemedia: Remove some unnecessary variables
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1613>
Mathieu Duponchelle [Fri, 28 Jan 2022 18:58:55 +0000 (19:58 +0100)]
docs: gst-libav: update cache and symbol index for FFmpeg 4.4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1597>