platform/upstream/gstreamer.git
2 years agodocs: Extend documentation for the GStreamer development environment
Sebastian Fricke [Fri, 18 Feb 2022 09:47:47 +0000 (10:47 +0100)]
docs: Extend documentation for the GStreamer development environment

Add more extensive documentation for the development environment.
Document how the tool works, how to use it and common use cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agoRemove the uninstalled term
Sebastian Fricke [Mon, 21 Feb 2022 09:49:15 +0000 (10:49 +0100)]
Remove the uninstalled term

Remove the symbolic link `gst-uninstalled` which points to `gst-env`.
The `uninstalled` is the old name and the project should stick to a
single name for the procedure.
Remove the term from all the files, exceptions are variables from
dependencies like `uninstalled_variables` from pkgconfig and
`meson-uninstalled`.
Adjust mentions of the script in the documentation and README.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agoAllow running gst-uninstalled when GStreamer is a subproject
Sebastian Fricke [Thu, 17 Feb 2022 20:44:30 +0000 (21:44 +0100)]
Allow running gst-uninstalled when GStreamer is a subproject

As described in Merge request 222, the previous solution is not the
best possible solution and was also missing documentation.
Adjust the suggestion to the current GStreamer mono-repository.
And apply this change after reverting the previous commit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agotests: Remove deleted gst-env option from test
Sebastian Fricke [Tue, 22 Feb 2022 08:20:38 +0000 (09:20 +0100)]
tests: Remove deleted gst-env option from test

The `gstbuilddir` option has been removed by reverting the commit
879126a3. But the later commit 1babccfe503 uses the option within a test.
Remove the mentioned option from the test.

Fixes: 1babccfe503  Fix using overrides when not building PyGObject
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agoRevert "Allow running gst-uninstalled when gst-build is a subproject"
Sebastian Fricke [Thu, 17 Feb 2022 20:41:40 +0000 (21:41 +0100)]
Revert "Allow running gst-uninstalled when gst-build is a subproject"

This reverts commit 879126a31c77622f594e70f205fcefd4556d9865.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agoMaintain build instructions at a single location
Sebastian Fricke [Wed, 23 Feb 2022 10:10:11 +0000 (11:10 +0100)]
Maintain build instructions at a single location

Do not maintain similar build instructions within each gst-plugins-*
subproject and the subproject/gstreamer subproject. Use the build
instructions from the mono-repository and link to them via hyperlink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agoAdd documentation for GST_VALIDATE_APPS_DIR
Sebastian Fricke [Thu, 17 Feb 2022 14:25:21 +0000 (15:25 +0100)]
Add documentation for GST_VALIDATE_APPS_DIR

Add documentation for the environment variable, explaining what it is
used for and the default search locations.

Fixes: 4d569b51ed2 add a way to specify an application directory.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agoImprove environment variable documentation
Sebastian Fricke [Thu, 17 Feb 2022 10:35:49 +0000 (11:35 +0100)]
Improve environment variable documentation

At GST_VALIDATE_FILE:
s/will be outputed/are output/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agoAdd documentation for GST_VALIDATE_PLUGIN_PATH
Sebastian Fricke [Thu, 17 Feb 2022 10:32:14 +0000 (11:32 +0100)]
Add documentation for GST_VALIDATE_PLUGIN_PATH

Add documentation for the environment variable, explaining what it is
used for and the default search locations.

Fixes: 83d6978f80 Implement fault_injection as a Gs(tValidate)Plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agogst-env: Improve coding style and cleanup
Sebastian Fricke [Wed, 16 Feb 2022 09:17:23 +0000 (10:17 +0100)]
gst-env: Improve coding style and cleanup

* Remove unused variables
* Remove unused imports
* Apply pycodestyle style suggestions
  - Missing newlines
  - spaces before brackets
  - Wrong indentations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agodocs: Add vah264enc metadata.
Víctor Manuel Jáquez Leal [Mon, 21 Feb 2022 11:26:49 +0000 (12:26 +0100)]
docs: Add vah264enc metadata.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agova: enable the H264 encoder.
He Junyan [Mon, 4 Oct 2021 17:53:19 +0000 (01:53 +0800)]
va: enable the H264 encoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agova: Add H264 encoder.
He Junyan [Mon, 4 Oct 2021 17:51:48 +0000 (01:51 +0800)]
va: Add H264 encoder.

This a new VA-API implementation of a H264 encoder.

It can control the GOP and parameter settings, while the MV searching,
VCL and the rate control algorithm are implemented by VA drivers and HW.
It supports most of the common usage options in H264, but still lacks
of look ahead, field, B frame weighted prediction, etc.

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agova: Add a common encoder object.
He Junyan [Mon, 4 Oct 2021 17:50:07 +0000 (01:50 +0800)]
va: Add a common encoder object.

As the counterpart of the va decoder, this class handles all the
common logic for the encoding routine and miscellaneous queries about
encoding.

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agova: Add vacompat.h to wrap glib functions.
He Junyan [Thu, 20 Jan 2022 13:44:20 +0000 (21:44 +0800)]
va: Add vacompat.h to wrap glib functions.

The g_queue_clear_full() and g_array_copy() functions in the glib
may not be available for the current glib version check, so we add
helper functions to wrap it.
This should be deleted after the glib version bumps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agova: Add the profile string name into the profile_map.
He Junyan [Thu, 21 Oct 2021 14:56:23 +0000 (22:56 +0800)]
va: Add the profile string name into the profile_map.

We also add a helper function of gst_va_profile_from_name to get
the VA profile value by its profile string name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agova: Change the H264 profile string order in the profile_map.
He Junyan [Mon, 4 Oct 2021 17:53:47 +0000 (01:53 +0800)]
va: Change the H264 profile string order in the profile_map.

The first one should be the one that matches the VA profile's name
most precisely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agova: caps: Expose gst_va_create_coded_caps as helper function.
He Junyan [Mon, 4 Oct 2021 17:45:25 +0000 (01:45 +0800)]
va: caps: Expose gst_va_create_coded_caps as helper function.

And allow free indentation for array declaration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agotest: Add test cases for the H264 bitwriter.
He Junyan [Mon, 4 Oct 2021 17:43:28 +0000 (01:43 +0800)]
test: Add test cases for the H264 bitwriter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agocodecparsers: bitwriter: Add the common bit writer functions for H264.
He Junyan [Mon, 4 Oct 2021 17:42:41 +0000 (01:42 +0800)]
codecparsers: bitwriter: Add the common bit writer functions for H264.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agocodecparsers: nalutils: Add nal_writer_reset_and_get_data help function.
He Junyan [Mon, 4 Oct 2021 17:41:07 +0000 (01:41 +0800)]
codecparsers: nalutils: Add nal_writer_reset_and_get_data help function.

We not only want to create a NAL gstmemory, but also need to create and
get the raw data of a NAL writer for the later usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agogs: look for google_cloud_cpp_storage.pc
Guillaume Desmottes [Mon, 28 Feb 2022 15:33:23 +0000 (16:33 +0100)]
gs: look for google_cloud_cpp_storage.pc

storage_client.pc was legacy and has been removed:
https://github.com/googleapis/google-cloud-cpp/commit/df6fa3611cdfbc37d40e1451afa91fd7d2e7d5f7#diff-bc35ad7c2fe631fd5578a06092412dba81c7ddd27bb25df7e17bb13771799afcL743

No need to keep looking for storage_client.pc as a fallback as 1.25.0,
our minimum version, already ships google_cloud_cpp_storage.pc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1815>

2 years agoyadif.asm: Fix improper usage of LOAD macro
Vivia Nikolaidou [Mon, 28 Feb 2022 22:12:56 +0000 (00:12 +0200)]
yadif.asm: Fix improper usage of LOAD macro

LOAD macro relies in m7 being zero for interleaving purposes. Using LOAD
on the m7 register makes it interleave with its new content instead of
with 0.

The effect of this bug was bobbing on some static lines that appeared
over fast-moving content.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1816>

2 years agoyadif.asm: Typo fixes in comments
Vivia Nikolaidou [Mon, 28 Feb 2022 22:12:33 +0000 (00:12 +0200)]
yadif.asm: Typo fixes in comments

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1816>

2 years agoyadif: Fix bug in C implementation of CHECK
Vivia Nikolaidou [Mon, 28 Feb 2022 18:39:11 +0000 (20:39 +0200)]
yadif: Fix bug in C implementation of CHECK

It was different compared to the corresponding part in both ffmpeg and
the asm implementation. Fixing this makes videotestsrc pattern=spokes
not jump at all when not using the asm optimisations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1816>

2 years agoipcpipeline: fix crash and error on windows with SOCKET or _pipe()
jinsl00000 [Fri, 25 Feb 2022 07:00:05 +0000 (15:00 +0800)]
ipcpipeline: fix crash and error on windows with SOCKET or _pipe()

The fd was in different meanings on windows:
POSIX read and write use the fd as a file descriptor.
The gst_poll use the fd as a WSASocket.

This patch use WSASocket as default on windows. This is a temporary measure, because IPC has many different implement. There may be a better way in the future.

See #1044

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1791>

2 years agov4l2videodec : enable resolution change
Ming Qian [Tue, 19 Oct 2021 08:10:06 +0000 (16:10 +0800)]
v4l2videodec : enable resolution change

The dynamic resolution changes when
the sequence starts when the decoder detects a coded frame with one or
more of the following parameters different from those previously
established (and reflected by corresponding queries):
1.coded resolution (OUTPUT width and height),
2.visible resolution (selection rectangles),
3.the minimum number of buffers needed for decoding,
4.bit-depth of the bitstream has been changed.

Although gstreamer parser has parsed the stream resolution.
but there are some case that we need to handle resolution change event.
1. bit-depth is different from the negotiated format.
2. the capture buffer count can meet the demand
3. there are some hardware limitations that the decoded resolution may
be larger than the display size. For example, the stream size is
1920x1080, but some vpu may decode it to 1920x1088.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1381>

2 years agov4l2videodec : refactor the setup process of capture
Ming Qian [Tue, 26 Oct 2021 02:03:42 +0000 (10:03 +0800)]
v4l2videodec : refactor the setup process of capture

v4l2videodec do some refactoring so that it can support
dynamic resolution change event.

1.wrap the setup process of capture as a function,
as decoder need setup the capture again when
dynamic resolution change event is received.

2.move the function "remove_padding"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1381>

2 years agovideo-info: encoded format can have RGB color-matrix (Fixes #1435)
Célestin Marot [Fri, 10 Dec 2021 14:51:51 +0000 (15:51 +0100)]
video-info: encoded format can have RGB color-matrix (Fixes #1435)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1435>

2 years agoMSDK: Add _context_query() and avoid compile error on Windows
Wu Tong [Mon, 14 Feb 2022 08:15:46 +0000 (16:15 +0800)]
MSDK: Add _context_query() and avoid compile error on Windows

To avoid compile error on Windows, macro definitions are added to suppress va
variables. In the meantime, add function _context_query() to query
context on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1693>

2 years agobuffer: Clarify that the MARKER flag maps to the corresponding RTP header flag
Sebastian Dröge [Wed, 23 Feb 2022 08:13:54 +0000 (10:13 +0200)]
buffer: Clarify that the MARKER flag maps to the corresponding RTP header flag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1776>

2 years agortp: In payloaders map the RTP marker flag to the corresponding buffer flag
Sebastian Dröge [Tue, 22 Feb 2022 09:18:53 +0000 (11:18 +0200)]
rtp: In payloaders map the RTP marker flag to the corresponding buffer flag

This allows downstream of a payloader to know the RTP header's marker
flag without first having to map the buffer and parse the RTP header.

Especially inside RTP header extension implementations this can be
useful to decide which packet corresponds to e.g. the last packet of a
video frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1776>

2 years agoosxaudiosrc: Support a device as both input and output
Joseph Donofry [Mon, 6 Dec 2021 17:49:18 +0000 (12:49 -0500)]
osxaudiosrc: Support a device as both input and output

osxaudiodeviceprovider now probes devices more than once to determine
if the device can function as both an input AND and output device.

Previously, if the device provider detected that a device had any output
capabilities, it was treated solely as an Audio/Sink.  This causes issues
that have both input and output capabilities (for example, USB interfaces
for professional audio have both input and output channels).  Such devices
are now listed as both an Audio/Sink as well as an Audio/Source.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1385>

2 years agoregistry: Fix multi-line `#warning` compiler warning
Sebastian Dröge [Sun, 27 Feb 2022 11:17:40 +0000 (13:17 +0200)]
registry: Fix multi-line `#warning` compiler warning

  subprojects/gstreamer/gst/gstregistry.c:1593: unexpected character `"'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1802>

2 years agovideo-format-info: Use correct parameter name in gst_video_format_info_extrapolate_st...
Sebastian Dröge [Sun, 27 Feb 2022 11:19:49 +0000 (13:19 +0200)]
video-format-info: Use correct parameter name in gst_video_format_info_extrapolate_stride() docs

../subprojects/gst-plugins-base/gst-libs/gst/video/video-format.c:7570: Warning: GstVideo: gst_video_format_info_extrapolate_stride: unknown parameter 'info' in documentation comment, should be 'finfo'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1803>

2 years agortp: ldac: Set frame count information in payload
Sanchayan Maity [Thu, 24 Feb 2022 14:58:23 +0000 (20:28 +0530)]
rtp: ldac: Set frame count information in payload

The RTP payload seems to be required as it carries the frame count
information. Also, gst_rtp_base_payload_allocate_output_buffer had
the second argument incorrect.

Strangely some devices like Shanling MP4 and Sony XM3 would still
work without this while some like the Sony XM4 do not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1797>

2 years agoldac: Set eqmid in caps
Sanchayan Maity [Thu, 24 Feb 2022 14:56:46 +0000 (20:26 +0530)]
ldac: Set eqmid in caps

We set the eqmid in caps to be usable downstream by rtpldacpay for
knowing the frame count.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1797>

2 years agotsmux: Skip empty buffers
Vivia Nikolaidou [Mon, 31 Jan 2022 14:13:32 +0000 (16:13 +0200)]
tsmux: Skip empty buffers

They can be created e.g. by aggregator when there is a gap. Such buffers
should not be muxed at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1611>

2 years agodevenv: Add some missing GStreamer specific env variables
Xavier Claessens [Mon, 21 Feb 2022 16:37:26 +0000 (11:37 -0500)]
devenv: Add some missing GStreamer specific env variables

This should make "meson devenv" closer to what "gst-env.py" sets.

- GST_VALIDATE_SCENARIOS_PATH
- GST_VALIDATE_APPS_DIR
- GST_OMX_CONFIG_DIR
- GST_ENCODING_TARGET_PATH
- GST_PRESET_PATH
- GST_PLUGIN_SCANNER
- GST_PTP_HELPER
- _GI_OVERRIDES_PATH

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1768>

2 years agodevenv: Prepend to GST_PLUGIN_PATH
Xavier Claessens [Mon, 21 Feb 2022 16:35:41 +0000 (11:35 -0500)]
devenv: Prepend to GST_PLUGIN_PATH

Use may have their own GST_PLUGIN_PATH, or a custom user subproject
could have their own plugins too. This is also what gst-env.py does.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1768>

2 years agoaudioconvert: Add dithering-threshold property
Sebastian Dröge [Wed, 16 Feb 2022 16:49:52 +0000 (18:49 +0200)]
audioconvert: Add dithering-threshold property

By default, no dithering is applied if the target bit depth is above 20
bits. This new property allows to apply dithering nonetheless in these
cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1730>

2 years agofdkaacdec: Support arbitrary channel configs
Jan Alexander Steffens (heftig) [Wed, 5 Dec 2018 00:22:48 +0000 (01:22 +0100)]
fdkaacdec: Support arbitrary channel configs

Try to match the config to GStreamer positions. If something doesn't
fit, fall back to a set of unpositioned channels.

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

2 years agofdkaacdec: Use predefined channel layouts
Jan Alexander Steffens (heftig) [Wed, 5 Dec 2018 00:07:19 +0000 (01:07 +0100)]
fdkaacdec: Use predefined channel layouts

This limits the decoder to the layouts predefined for the encoder
(including the MPEG standard layouts) but greatly simplifies the
implementation.

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

2 years agotsmux: Lock mux->tsmux, the programs hash table, and pad streams
Vivia Nikolaidou [Tue, 1 Feb 2022 12:51:27 +0000 (14:51 +0200)]
tsmux: Lock mux->tsmux, the programs hash table, and pad streams

They contain implementations that are not thread-safe (e.g. GList, GHashTable).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1616>

2 years agoaudio-quantize: Switch dither PRNG from LCG to xorshift
Sebastian Dröge [Wed, 16 Feb 2022 11:28:52 +0000 (13:28 +0200)]
audio-quantize: Switch dither PRNG from LCG to xorshift

While this is slightly more expensive (~48% slower per random number) it
does not cause any measurable difference when running through a complete
audio conversion pipeline.

On the other hand its random numbers are of much higher quality and on
spectrograms for 32 bit to 24 bit conversion the difference is clearly
visible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1729>

2 years agodeinterlace: greedyh: Stop adding 2 to cur_field_idx
Jan Alexander Steffens (heftig) [Fri, 25 Feb 2022 11:44:26 +0000 (12:44 +0100)]
deinterlace: greedyh: Stop adding 2 to cur_field_idx

Just a simplification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>

2 years agodeinterlace: greedyh: Use _plane in _packed, fix planar formats
Jan Alexander Steffens (heftig) [Thu, 24 Feb 2022 16:36:40 +0000 (17:36 +0100)]
deinterlace: greedyh: Use _plane in _packed, fix planar formats

This greatly reduces code duplication. It also exposed the cause for
planar formats not being properly deinterlaced:

The planar path was missing the initial offset adjustment that the
packed path did to `L2` and `L2P` in the case of an even field, which
caused it to select the wrong weave lines every other field.

Add those offsets in `_plane`.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1047
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>

2 years agodeinterlace: greedyh: Rename _planar_plane to _plane
Jan Alexander Steffens (heftig) [Fri, 25 Feb 2022 11:39:31 +0000 (12:39 +0100)]
deinterlace: greedyh: Rename _planar_plane to _plane

As well as `i` to `plane`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>

2 years agodeinterlace: greedyh: Move code from _planar into _planar_plane
Jan Alexander Steffens (heftig) [Fri, 25 Feb 2022 11:36:17 +0000 (12:36 +0100)]
deinterlace: greedyh: Move code from _planar into _planar_plane

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>

2 years agodeinterlace: greedyh: Move _planar_plane upwards
Jan Alexander Steffens (heftig) [Fri, 25 Feb 2022 11:30:21 +0000 (12:30 +0100)]
deinterlace: greedyh: Move _planar_plane upwards

In preparation of refactoring. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>

2 years agogst-play: Fix trick-mode handling.
Jan Schmidt [Fri, 21 Jan 2022 14:30:57 +0000 (01:30 +1100)]
gst-play: Fix trick-mode handling.

The instant-rate value in the TrickMode enum is a
flag, but the other values are not. Move instant-rate
to the end of the enum and give it a value large enough
for it to be used without modifying the trick-mode
setting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1788>

2 years agoappsrc: Store strong references to the expected buffers in the tests
Sebastian Dröge [Thu, 24 Feb 2022 08:09:50 +0000 (10:09 +0200)]
appsrc: Store strong references to the expected buffers in the tests

Otherwise the buffers might already be freed as they were only owned by
the GstSample / appsrc and potentially don't survive until the pad
probe, as observed in some CI runs of the tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1787>

2 years agomsdkdec: Fix uninitialized variables
Mengkejiergeli Ba [Thu, 17 Feb 2022 07:16:40 +0000 (15:16 +0800)]
msdkdec: Fix uninitialized variables

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1731>

2 years agomsdk: Fix unchecked return values
Mengkejiergeli Ba [Thu, 17 Feb 2022 07:12:52 +0000 (15:12 +0800)]
msdk: Fix unchecked return values

There are several calls of gst_video_info_from_caps and gst_video_frame_copy
without checks for the returned values. This patch adds all necessary
function return checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1738>

2 years agoci: Disable windows jobs for now
Jordan Petridis [Thu, 24 Feb 2022 13:33:21 +0000 (15:33 +0200)]
ci: Disable windows jobs for now

The runner is down and under maintainance.

2 years agovideoaggregator: Correct use of start_time/end_time
Jan Alexander Steffens (heftig) [Tue, 22 Feb 2022 14:08:48 +0000 (15:08 +0100)]
videoaggregator: Correct use of start_time/end_time

When 29713c5d changed most uses of `start_time` and `end_time` to
`start_running_time` and `end_running_time`, it missed two.

Fixes: 29713c5d40a1d7d1f21dada68f55f7a97f0b7025
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1038
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1779>

2 years agox264enc: Update long-name and description
Ruben Gonzalez [Mon, 21 Feb 2022 22:29:23 +0000 (23:29 +0100)]
x264enc: Update long-name and description

Update x264enc long-name to be more than just the name. Then the
description also was updated to be longer than the long-name, and
similar to the plugin description.

Finally, as I am here, H264 was replaced by H.264 and x264 is only a
plugin (not plugins).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1771>

2 years agoqsvencoder: Fix caps leak in Linux build
Seungha Yang [Mon, 21 Feb 2022 20:19:51 +0000 (05:19 +0900)]
qsvencoder: Fix caps leak in Linux build

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1769>

2 years agoqsv: Fix debug category name of qsvallocator
Seungha Yang [Mon, 21 Feb 2022 20:15:04 +0000 (05:15 +0900)]
qsv: Fix debug category name of qsvallocator

Remove gst prefix to make $env:GST_DEBUG="qsv*:6" work for qsvallocator
as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1769>

2 years agobad:docs: Add vaav1dec in documentation
Mengkejiergeli Ba [Mon, 21 Feb 2022 08:45:50 +0000 (16:45 +0800)]
bad:docs: Add vaav1dec in documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1773>

2 years agoci: remove jenkins files which are no longer used
Tim-Philipp Müller [Mon, 21 Feb 2022 09:42:49 +0000 (09:42 +0000)]
ci: remove jenkins files which are no longer used

Fixes #1031

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1763>

2 years agortpsource: fix rtp_source_get_nack_deadlines doc
Guillaume Desmottes [Tue, 22 Feb 2022 09:13:28 +0000 (10:13 +0100)]
rtpsource: fix rtp_source_get_nack_deadlines doc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1775>

2 years agortpbasepayload: Copy all buffer metadata instead of just GstMetas for the input meta...
Sebastian Dröge [Tue, 22 Feb 2022 08:54:23 +0000 (10:54 +0200)]
rtpbasepayload: Copy all buffer metadata instead of just GstMetas for the input meta buffer

This gives RTP header extensions some more metadata to work from.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1774>

2 years agogl: Mark GL memory GType functions as deprecated
Sebastian Dröge [Mon, 21 Feb 2022 12:23:27 +0000 (14:23 +0200)]
gl: Mark GL memory GType functions as deprecated

They can't be used in any useful way. The type of every GstMemory is
always GST_TYPE_MEMORY and the subtyping relationship has to be
implemented on top of that via the associated allocator and mem_type
string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>

2 years agogl: Add `#ifndef GST_REMOVE_DEPRECATED` for existing deprecated API
Sebastian Dröge [Mon, 21 Feb 2022 13:12:04 +0000 (15:12 +0200)]
gl: Add `#ifndef GST_REMOVE_DEPRECATED` for existing deprecated API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>

2 years agogl: Add versioned `Deprecated` marker to gst_gl_display_find_window
Sebastian Dröge [Mon, 21 Feb 2022 13:08:44 +0000 (15:08 +0200)]
gl: Add versioned `Deprecated` marker to gst_gl_display_find_window

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>

2 years agogl: Replace existing G_DEPRECATED_FOR usage with GST_GL_DEPRECATED_FOR
Sebastian Dröge [Mon, 21 Feb 2022 13:05:55 +0000 (15:05 +0200)]
gl: Replace existing G_DEPRECATED_FOR usage with GST_GL_DEPRECATED_FOR

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>

2 years agogl: Add GST_GL_DEPRECATED
Sebastian Dröge [Mon, 21 Feb 2022 13:02:02 +0000 (15:02 +0200)]
gl: Add GST_GL_DEPRECATED

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>

2 years agod3d11: Remove non-existing gst_d3d11_memory_get_type() API from header
Sebastian Dröge [Mon, 21 Feb 2022 12:17:11 +0000 (14:17 +0200)]
d3d11: Remove non-existing gst_d3d11_memory_get_type() API from header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1764>

2 years agov4l2codecs: Support YUV420M format
Dmitry Osipenko [Mon, 14 Feb 2022 20:30:45 +0000 (23:30 +0300)]
v4l2codecs: Support YUV420M format

YUV420M format of V4L essentially is I420 with separate memory planes.
It's used by NVIDIA Tegra V4L decoder. Support this format by v4l2codecs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1727>

2 years agoulpfecenc: slightly safer dispose impl
Matthew Waters [Mon, 21 Feb 2022 02:27:06 +0000 (13:27 +1100)]
ulpfecenc: slightly safer dispose impl

Technically dispose can be called more than once (even if gstelement is
not actually set up to do that) so need to protect against that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1761>

2 years agoulpfecenc: fix unmatched free() call
Matthew Waters [Mon, 21 Feb 2022 02:24:07 +0000 (13:24 +1100)]
ulpfecenc: fix unmatched free() call

One must always match a g_slice_new with a g_slice_free and a g_new with
a g_free.  This was not the case for the internal ctx struct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1761>

2 years agortpulpfecenc: add some debug logging
Matthew Waters [Tue, 9 Nov 2021 06:37:24 +0000 (17:37 +1100)]
rtpulpfecenc: add some debug logging

Like, what configuration we are using or whether a fec packet is
generated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1761>

2 years agomatroska-demux: Emit a warning when no codec data found
Nirbheek Chauhan [Fri, 18 Feb 2022 09:53:13 +0000 (15:23 +0530)]
matroska-demux: Emit a warning when no codec data found

It is bad if an mkv file does not have codec data for the ProRes
variant, so we should emit a warning. ffmpeg does the same thing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1739>

2 years agoaudiovisualizer: shader: Fix dframe out of bound write
Sebastian Groß [Sun, 20 Feb 2022 13:05:05 +0000 (14:05 +0100)]
audiovisualizer: shader: Fix dframe out of bound write

shader_fade_and_move_horiz_out writes a complete stride at the end of its
dframe data

This led to SIGSEGV since the stride reached into sframe->map[0]->memory
which could not be umpapped later on.

This is due to `d` is increased twice. Once at the end of the upper loop
and at the start of the lower loop.
The corresponding dframe stride is therefore skipped.

Rewind `d` and start at the correct position.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1751>

2 years agotests/clock: avoid a race cranking
Matthew Waters [Wed, 3 Nov 2021 06:05:07 +0000 (17:05 +1100)]
tests/clock: avoid a race cranking

Scenario:
- Source 1 requesting and waiting a clock id
- Source 2 requesting and waiting on a clock id
- Test attempting to crank both sources in the same GstHarness

gst_test_clock_crank() originally dropped locks between the retrieving
of the next clock id and advancing to the next clock id.  This would
mean that both sources would race each other attempting to complete
their clock waits.  Sometimes the operations would be performed in the
correct order, other times they would not and a FALSE return value would
be produced.

This would lead to an assertion in gst_harness_push_from_src() expecting
that all clock cranks to succeed.

Fix by ensuring that the clock wait produced is dealt with before
processing the next by not dropping the relevant locks after retrieving
the next clock id.

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

2 years agod3d11screencapturesrc: Use staging buffer pool for performance
Seungha Yang [Sun, 20 Feb 2022 14:59:46 +0000 (23:59 +0900)]
d3d11screencapturesrc: Use staging buffer pool for performance

By using staging pool/buffer, we can avoid per frame
staging texture -> system memory copy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1756>

2 years agodoc: Add NV12_16L32S into the cache
Nicolas Dufresne [Sun, 20 Feb 2022 20:20:07 +0000 (15:20 -0500)]
doc: Add NV12_16L32S into the cache

Autogenerated by CI

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

2 years agotests: video: Add a unit test for stride extrapolation
Nicolas Dufresne [Fri, 18 Feb 2022 20:25:17 +0000 (15:25 -0500)]
tests: video: Add a unit test for stride extrapolation

This is a minimal unit test the show that the stride extrapolation can work
with all pixel format we support. This minimal verify that the extrapolation
match the stride we set into GstVideoInfo with 320x240 for all the pixel
format we support. The tiles formats are skipped, since their stride is
set as two 16bit integers, and we also skip over palette planes.

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

2 years agov4l2codecs: Enable MediaTek MM21 (NV12_16L32S)
Nicolas Dufresne [Wed, 26 Jan 2022 18:39:40 +0000 (13:39 -0500)]
v4l2codecs: Enable MediaTek MM21 (NV12_16L32S)

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

2 years agov4l2codecs: Add support for multi planar buffers
Nicolas Dufresne [Wed, 19 Jan 2022 20:53:05 +0000 (15:53 -0500)]
v4l2codecs: Add support for multi planar buffers

V4L2 have some pixel formats that produces 2 dmabuf, this add
support for these format.

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

2 years agov4l2transform: Handle caps changes
Nicolas Dufresne [Wed, 26 Jan 2022 15:06:50 +0000 (10:06 -0500)]
v4l2transform: Handle caps changes

As this element is single threaded, we only need to stop the objects to
allow changing the format again. Fixes assertion notably on shutdown and
on some other situation where the format may be set twice without
actually activating the element.

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

2 years agov4l2object: Avoid crash on early failure
Nicolas Dufresne [Wed, 26 Jan 2022 14:55:09 +0000 (09:55 -0500)]
v4l2object: Avoid crash on early failure

This happens while an external error lead to an early shutdown.

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

2 years agovideo4linux2: Add MM21 support
Nicolas Dufresne [Tue, 25 Jan 2022 19:34:32 +0000 (14:34 -0500)]
video4linux2: Add MM21 support

This enables mtk-vcodec and MDP driver from mainline Linux kernel.

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

2 years agoPort plugins to gst_video_format_info_extrapolate_stride()
Nicolas Dufresne [Tue, 25 Jan 2022 19:08:47 +0000 (14:08 -0500)]
Port plugins to gst_video_format_info_extrapolate_stride()

This reduces code duplication and simplify addition of new
pixel formats into related plugins.

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

2 years agovideo: Add an helper to extrapolate strides
Nicolas Dufresne [Tue, 25 Jan 2022 19:04:13 +0000 (14:04 -0500)]
video: Add an helper to extrapolate strides

Many of the legacy APIs, specifically in the Linux Kernel, have a
single stride for the pictures. In this context, it is common
to extrapolate the other strides based on the selected pixel
format. Such function have been copy pasted from video4linux2
plugin into wayland, kms and v4l2codecs plugins.

This patch implements a generalized from of that function and
make it available to everyone through the video library.

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

2 years agovideo: Add NV12_16L32S aka Mediatek MM21 support
Nicolas Dufresne [Fri, 3 Dec 2021 02:46:59 +0000 (21:46 -0500)]
video: Add NV12_16L32S aka Mediatek MM21 support

Unlike other simple tiled formats, the Mediatek HW use different tile size
per-plane. The tile size is scaled according to the subsampling. Effectively,
using the name 16L32S to represent linearly layout tiles of size 16x32 bytes
in the Y plane, and 16x16 in the UV plane. In order to make this specificity
discoverable, a new SUBTILES flags have been added.

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

2 years agogstv4l2tuner: return NULL if no norm set
Rouven Czerwinski [Wed, 2 Feb 2022 11:49:29 +0000 (12:49 +0100)]
gstv4l2tuner: return NULL if no norm set

If the video4linux device supports norms but has no norm set, norm is
returned as an uninitialized variable after the ioctl call, leading to
gst_v4l2_tuner_get_norm_by_std_id() returning a random norm from the
supported norms. Catch this case and instead return NULL to indicate
that no norm is setup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1625>

2 years agowinscreencap: Remove dxgiscreencapsrc element
Seungha Yang [Sat, 19 Feb 2022 21:36:45 +0000 (06:36 +0900)]
winscreencap: Remove dxgiscreencapsrc element

We have the d3d11screencapturesrc element in d3d11 plugin
which is obviously better than this element in terms of performance
and design, so we don't need to make people be confused by two separate elements.

Let's pick the better implementation and remove unnecessary one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1750>

2 years agowpe: Clean up build script
Jan Alexander Steffens (heftig) [Tue, 8 Feb 2022 14:23:17 +0000 (15:23 +0100)]
wpe: Clean up build script

Use feature.require to check for gstgl and exit early if 'wpe' is
disabled (don't even check for wpe-webkit-1.1).

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

2 years agodirectshow: Fix build warnings
Seungha Yang [Fri, 18 Feb 2022 15:37:34 +0000 (00:37 +0900)]
directshow: Fix build warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1744>

2 years agodirectshow: Merge plugins into single directshow plugin
Seungha Yang [Fri, 18 Feb 2022 15:14:38 +0000 (00:14 +0900)]
directshow: Merge plugins into single directshow plugin

... and lower rank of dshowvideosink and dshowdeviceprovider
to GST_RANK_MARGINAL since we don't prefer this plugin
by default

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1744>

2 years agodirectshow: Remove white spaces
Seungha Yang [Fri, 18 Feb 2022 15:12:55 +0000 (00:12 +0900)]
directshow: Remove white spaces

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1744>

2 years agovulkanshaderspv: SPIRV based filter
Martin Reboredo [Tue, 19 Oct 2021 19:10:06 +0000 (16:10 -0300)]
vulkanshaderspv: SPIRV based filter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1197>

2 years agoscenarios: Update for videoaggregator rounding behavior change
Seungha Yang [Fri, 18 Feb 2022 18:26:00 +0000 (03:26 +0900)]
scenarios: Update for videoaggregator rounding behavior change

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1747>

2 years agovideoaggregator: Use floor() to calculate current position
Seungha Yang [Fri, 18 Feb 2022 16:58:20 +0000 (01:58 +0900)]
videoaggregator: Use floor() to calculate current position

... instead of round(). Depending on framerate, calculated position
may not be clearly represented by using uint64, 30000/1001 for example.
Then the result of round() can be sliglhtly larger (1ns) than
buffer timestamp. And that will cause unnecessary frame delay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1747>

2 years agov4l2codecs: vp9: Fix reset_frame_context parameter
Nicolas Dufresne [Fri, 18 Feb 2022 21:23:09 +0000 (16:23 -0500)]
v4l2codecs: vp9: Fix reset_frame_context parameter

It was assumed that the kernel parameters would match with the bitstream value
but instead the author when with another set of value. Surprisingly, this
makes no difference with the resulting fluster score.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1748>

2 years agov4l2codecs: vp9: Only fill compressed headers if needed
Nicolas Dufresne [Fri, 18 Feb 2022 21:02:27 +0000 (16:02 -0500)]
v4l2codecs: vp9: Only fill compressed headers if needed

Fixes: 13944cf3ee871722 ("v4l2codecs: vp9: Make compressed hdr control optional")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1748>

2 years agov4l2: include <sys/ioccom.h> on Illumos
Tim Mooney [Sat, 15 Jan 2022 05:42:27 +0000 (23:42 -0600)]
v4l2: include <sys/ioccom.h> on Illumos

Needed for _IOR/_IORW

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

2 years agodoc: Fix doc comment for GstChildProxy
Nicolas Dufresne [Tue, 2 Nov 2021 19:58:49 +0000 (15:58 -0400)]
doc: Fix doc comment for GstChildProxy

This removes warning like:

../subprojects/gstreamer/gst/gstchildproxy.h:57: Error: Gst: identifier not found on the first line:
   * #GstChildProxyInterface::get_child_by_name:
     ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1297>