platform/upstream/gstreamer.git
2 years agoplugin: add Apache 2 license to known licenses
tom schuring [Sun, 29 May 2022 10:38:38 +0000 (20:38 +1000)]
plugin: add Apache 2 license to known licenses

the licence in gstreamer/subprojects/gstreamer/gst/gstplugin.c
currently is defined to be one of:
LGPL GPL QPL GPL/QPL MPL BSD MIT/X11 0BSD Proprietary
The open source project for the kinesis plugin is using an
Apache 2.0 license. Because "Apache 2.0" is not one of the
supported licenses it automatically falls back to Proprietary.

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

2 years agova264enc: Fix typo.
Víctor Manuel Jáquez Leal [Fri, 27 May 2022 12:47:21 +0000 (14:47 +0200)]
va264enc: Fix typo.

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

2 years agova: encoder: Fix regression since commit 2042c2d4f0.
Víctor Manuel Jáquez Leal [Fri, 27 May 2022 12:45:51 +0000 (14:45 +0200)]
va: encoder: Fix regression since commit 2042c2d4f0.

There's no need to compare with the open entrypoint to query the
encoder. This commit removes the checks to the configured entrypoint
with the parameter.

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

2 years agortpptdemux: Don't GST_FLOW_ERROR when ignoring invalid packets
Jan Schmidt [Sun, 29 May 2022 10:27:38 +0000 (20:27 +1000)]
rtpptdemux: Don't GST_FLOW_ERROR when ignoring invalid packets

https://bugzilla.gnome.org/show_bug.cgi?id=741398 changed
rtpptdemux in 2014 to not post a GST_ELEMENT_ERROR on the
bus when dropping an invalid (non-RTP) packet, but still
returned GST_FLOW_ERROR upstream - so the pipeline still
stops, but now without a useful bus error.

Return GST_FLOW_OK instead, so the pipeline keeps
running. Some old telephony equipment can send invalid
packets before the real RTP traffic starts.

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

2 years agomfvideoencoder: Handle dynamic property update
Seungha Yang [Sat, 26 Mar 2022 14:48:46 +0000 (23:48 +0900)]
mfvideoencoder: Handle dynamic property update

Re-init MFT on property update to apply new encoding options

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

2 years agomediafoundation: Run indent
Seungha Yang [Sat, 26 Mar 2022 14:50:24 +0000 (23:50 +0900)]
mediafoundation: Run indent

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

2 years agomfvideoenc: Remove redundant bitwise or operation
Seungha Yang [Sat, 26 Mar 2022 13:24:27 +0000 (22:24 +0900)]
mfvideoenc: Remove redundant bitwise or operation

MFT_ENUM_FLAG_SORTANDFILTER_APPROVED_ONLY (0xc0) covers
MFT_ENUM_FLAG_SORTANDFILTER (0x40)

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

2 years agomfvideoencoder: Early terminate d3d11 interop
Seungha Yang [Sat, 26 Mar 2022 12:47:10 +0000 (21:47 +0900)]
mfvideoencoder: Early terminate d3d11 interop

Shared texture will work only for the same GPU

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

2 years agomfvideoencoder: Check HRESULT code as well for GPU sync
Seungha Yang [Sat, 26 Mar 2022 12:43:50 +0000 (21:43 +0900)]
mfvideoencoder: Check HRESULT code as well for GPU sync

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

2 years agomfvideoencoder: Don't specify keyed mutex misc flag
Seungha Yang [Sat, 26 Mar 2022 12:40:47 +0000 (21:40 +0900)]
mfvideoencoder: Don't specify keyed mutex misc flag

Current implemetation copies textures using non-keyed mutex way.
D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX is pointless

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

2 years agojack: Always use jack_free as specified by the docs
Nirbheek Chauhan [Sat, 28 May 2022 11:16:04 +0000 (16:46 +0530)]
jack: Always use jack_free as specified by the docs

Fixes a crash on Windows due to a CRT mismatch. The JACK installation
still uses MSVCRT, and we the Universal CRT for both MinGW and MSVC.

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

2 years agojack: Add support for detecting libjack on Windows
Nirbheek Chauhan [Wed, 25 May 2022 19:51:43 +0000 (01:21 +0530)]
jack: Add support for detecting libjack on Windows

No source code changes were necessary to get the plugin working on
Windows with MSVC.

Run QJackCtl and audiotestsrc ! jackaudiosink just works.

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

2 years agovacompositor: Pass video info pointer than copying it.
Víctor Manuel Jáquez Leal [Wed, 25 May 2022 11:25:15 +0000 (13:25 +0200)]
vacompositor: Pass video info pointer than copying it.

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

2 years agovacompositor: Remove useless consts.
Víctor Manuel Jáquez Leal [Wed, 25 May 2022 11:24:41 +0000 (13:24 +0200)]
vacompositor: Remove useless consts.

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

2 years agod3d11decoder: Work around Intel DXVA driver crash
Seungha Yang [Fri, 27 May 2022 12:13:43 +0000 (21:13 +0900)]
d3d11decoder: Work around Intel DXVA driver crash

Intel DXVA driver crashes sometimes (from GPU thread) if
ID3D11VideoDecoder is released while there are outstanding view objects.
To make sure the object life cycle, holds an ID3D11VideoDecoder refcount
in GstD3D11Memory object.

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

2 years agoci: Make sure to always update subprojects
Xavier Claessens [Fri, 27 May 2022 13:37:41 +0000 (09:37 -0400)]
ci: Make sure to always update subprojects

The command was not run in Windows jobs, better keep subprojects
handling in a single script.

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

2 years agoqsvencoder: Bind internal texture to render target
Seungha Yang [Thu, 26 May 2022 14:50:08 +0000 (23:50 +0900)]
qsvencoder: Bind internal texture to render target

... so that memory allocator can initialize texture with black color

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

2 years agod3d11memory: Clear YUV texture with black color
Seungha Yang [Thu, 26 May 2022 14:46:05 +0000 (23:46 +0900)]
d3d11memory: Clear YUV texture with black color

We prefer black color as an initial texture color and
Direct3D11 runtime will initialize texture with zeros (except for alpha)
which is fine for RGB formats. But UV components of YUV texture
requires manual clear for black color.

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

2 years agotests: vaapi: remove unused header
U. Artie Eoff [Thu, 26 May 2022 16:08:44 +0000 (12:08 -0400)]
tests: vaapi: remove unused header

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

2 years agotests: vaapi: fix memleak in vaapioverlay test
U. Artie Eoff [Thu, 26 May 2022 16:06:43 +0000 (12:06 -0400)]
tests: vaapi: fix memleak in vaapioverlay test

Need to unmap the frame to ensure vaapioverlay can destruct/dispose.

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

2 years agotests: va: add simple vacompositor test
U. Artie Eoff [Tue, 24 May 2022 16:54:05 +0000 (12:54 -0400)]
tests: va: add simple vacompositor test

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

2 years agomsdkh265enc: Add intra refresh parameters
Mengkejiergeli Ba [Fri, 22 Apr 2022 08:29:56 +0000 (16:29 +0800)]
msdkh265enc: Add intra refresh parameters

Note that for msdkh265enc, intra refresh parameters are only supported
under low-power mode. If these parameters are set without enabling lowpower,
they will be simply ignored.

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

2 years agomsdkh264enc: Add intra refresh parameters
Mengkejiergeli Ba [Fri, 15 Apr 2022 05:38:20 +0000 (13:38 +0800)]
msdkh264enc: Add intra refresh parameters

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

2 years agotests: examples: Stop duplicating keyboard interaction handler code
Seungha Yang [Sun, 22 May 2022 15:36:50 +0000 (00:36 +0900)]
tests: examples: Stop duplicating keyboard interaction handler code

Extract the code from QSV and use it for D3D11 and NVCODEC examples

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

2 years agowebrtc: fix build with older libnice versions
Tim-Philipp Müller [Thu, 26 May 2022 13:08:55 +0000 (14:08 +0100)]
webrtc: fix build with older libnice versions

1) check for right macro name when checking for NICE_VERSION_CHECK

2) if libnice version is 0.1.18.1 this should not satisfy
   a NICE_VERSION_CHECK(0,1,19).

Fixes build with libnice 0.1.18.1 subproject checkout.

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

2 years agov4l2: Reset transfer in gst_v4l2_object_acquire_format()
Hou Qi [Tue, 24 May 2022 08:07:13 +0000 (16:07 +0800)]
v4l2: Reset transfer in gst_v4l2_object_acquire_format()

get_colorspace() checks input caps transfer when mapping V4L2_XFER_FUNC_709
back to V4L2_COLORSPACE_BT2020 and GST_VIDEO_TRANSFER_BT2020_12. After
receiving source change event, decoder will G_FMT and S_FMT again. So need
to reset transfer when acquiring format to avoid using the old transfer.

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

2 years agoamc: Don't map input buffer with write mode
Jan Schmidt [Mon, 23 May 2022 19:33:05 +0000 (05:33 +1000)]
amc: Don't map input buffer with write mode

When copying data out of a GStreamer buffer, we don't
need to map it writable.

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

2 years agowebrtc: Use new libnice API to get the candidate relay address
Philippe Normand [Wed, 11 May 2022 08:17:46 +0000 (09:17 +0100)]
webrtc: Use new libnice API to get the candidate relay address

Corresponding libnice API added in:
https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/229 (0.1.19)
https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/232 (0.1.20)

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

2 years agowebrtc: Ensure the NICE_CHECK_VERSION macro is available
Philippe Normand [Wed, 11 May 2022 08:15:33 +0000 (09:15 +0100)]
webrtc: Ensure the NICE_CHECK_VERSION macro is available

This macro was introduced in libnice 0.1.19.1, so until we bump our libnice
dependency to 0.1.20 we have to vendor the macro.

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

2 years agowebrtc: Refactor ICECandidateStats freeing logic to a dedicated function
Philippe Normand [Sat, 26 Mar 2022 12:36:46 +0000 (12:36 +0000)]
webrtc: Refactor ICECandidateStats freeing logic to a dedicated function

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

2 years agowebrtcbin: Document IceCandidateStats and RTCIceCandidatePairStats
Philippe Normand [Sun, 20 Mar 2022 12:36:07 +0000 (12:36 +0000)]
webrtcbin: Document IceCandidateStats and RTCIceCandidatePairStats

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

2 years agowebrtcstats: Update unit test for outbound rtp stats
Sherrill Lin [Wed, 1 Sep 2021 16:12:24 +0000 (16:12 +0000)]
webrtcstats: Update unit test for outbound rtp stats

"remote-id" is not guaranteed to present after commit 1deb034e3d873f577a38bc483e6256b0346ee874.
Thus, we should not fail the test if "remote-id" is not found.

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

2 years agowebrtcstats: Improve selected candidate pair stats by adding ICE candidate info
Sherrill Lin [Wed, 30 Jun 2021 20:01:10 +0000 (16:01 -0400)]
webrtcstats: Improve selected candidate pair stats by adding ICE candidate info

The implementation follows w3.org specs:
* https://www.w3.org/TR/webrtc-stats/#icecandidate-dict*
* https://www.w3.org/TR/webrtc-stats/#candidatepair-dict*

Corresponding unit tests are also added.

Rebased and updated from
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1462

Fixes #1207

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

2 years agova: H264enc: Add encoder for VAEntrypointEncSliceLP.
He Junyan [Mon, 23 May 2022 12:58:47 +0000 (20:58 +0800)]
va: H264enc: Add encoder for VAEntrypointEncSliceLP.

We name vah264lpenc to support H264's VAEntrypointEncSliceLP encoder.

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

2 years agova: encoder: Do not reset the frame count when reconfig().
He Junyan [Wed, 25 May 2022 12:01:34 +0000 (20:01 +0800)]
va: encoder: Do not reset the frame count when reconfig().

We should not reset the input/output_frame_count when some configure
changes. For example, the if resolution changes, the current way just
resets the frame count and make the PTS of the output buffer restart
from the original PTS of the first frame. That causes a lot of QOS
event and drop all the new frames.
We should only reset them when encoder start().

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

2 years agova: encoder: change reset_state() to a virtual function of base class.
He Junyan [Wed, 25 May 2022 11:57:18 +0000 (19:57 +0800)]
va: encoder: change reset_state() to a virtual function of base class.

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

2 years agoplaybin3: Configure combiner on pad-added if needed
Seungha Yang [Tue, 24 May 2022 17:10:30 +0000 (02:10 +0900)]
playbin3: Configure combiner on pad-added if needed

When collection is updated, decodebin3 exposes pad first and then
streams-selected message is posted.
The condition can cause a situation where playbin3 links non-existing
combiner/playsink pads (since streams-selected is not posted yet) with
new decodebin output pad. This commit will re-check selected/active
streams condition on pad-added and reconfigure output if needed.

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

2 years agocutter: Include running/stream-time in messages
Piotrek Brzeziński [Wed, 25 May 2022 11:00:58 +0000 (13:00 +0200)]
cutter: Include running/stream-time in messages

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

2 years agogstreamer-full-static: autopep on script
Stéphane Cerveau [Fri, 4 Feb 2022 13:47:32 +0000 (14:47 +0100)]
gstreamer-full-static: autopep on script

Pass autopep on generate_init_static_plugins.py

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

2 years agogstreamer-full-static: Be more strict with plugin param
Stéphane Cerveau [Fri, 4 Feb 2022 13:46:24 +0000 (14:46 +0100)]
gstreamer-full-static: Be more strict with plugin param

Check that the plugins are correctly separated by ";"
and do not accept "," or ":" inside.

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

2 years agovacompositor: check caps and info return values
U. Artie Eoff [Tue, 24 May 2022 14:21:31 +0000 (10:21 -0400)]
vacompositor: check caps and info return values

Check return values for get caps and video info from caps.

This was flagged by static analysis.

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

2 years agosoup: Fix plugin/element init
Stéphane Cerveau [Tue, 3 May 2022 09:34:15 +0000 (11:34 +0200)]
soup: Fix plugin/element init

In case of per features registration such as the
customizable gstreamer-full library, each
element should check that the soup library can be loaded to
facilitate the element registration.

Initialize the debug category properly

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

2 years agod3d11decoder: Don't print error log on negotiation failure
Seungha Yang [Tue, 24 May 2022 17:38:01 +0000 (02:38 +0900)]
d3d11decoder: Don't print error log on negotiation failure

It may not be a critical error and even expected when shutting down
pipeline or flushing.

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

2 years agod3d11screencapture: Fix missing/outdated cursor shape
Erwann Gouesbet [Tue, 24 May 2022 09:06:39 +0000 (11:06 +0200)]
d3d11screencapture: Fix missing/outdated cursor shape

d3d11screencapture can miss a cursor shape to draw or draw an outdated cursor shape.
 - AcquireNextFrame only provides cursor shape when there is one update
 - current d3d11screencapture skips cursor shape when mouse is not drawn

So, if a gstreamer application uses d3d11screencapture with cursor initially not drawn
"show-cursor"=false and then switches this property to true, the cursor will not be
actually drawn until AcquireNextFrame provides a new cursor shape.
This commit makes d3d11screencapture always update the cursor shape information, even
if the mouse is not drawn. d3d11screencapture will always have the latest cursor shape
when requested to draw it.

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

2 years agomeson: use better zlib dependency fallback
Eli Schwartz [Tue, 24 May 2022 01:24:40 +0000 (21:24 -0400)]
meson: use better zlib dependency fallback

zlib is required, and if it isn't found it is checked several ways and
then forced via subproject(). This code was added in commit
b93e37592a3ccc0eaece1c8fef2d362b1e5fe685, to account for systems where
zlib doesn't have pkg-config files installed.

But Meson already does dependency fallback, and also, since 0.54.0, does
the in-between checks for find_library('z') and has_header('zlib.h') via
the "system" type dependency. Simplify dependency lookup by marking it
as required, which also makes sure that the console log doesn't
confusingly list "not found".

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

2 years agova: Avoid unused variable if logging is disabled.
Víctor Manuel Jáquez Leal [Tue, 24 May 2022 12:47:43 +0000 (14:47 +0200)]
va: Avoid unused variable if logging is disabled.

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

2 years agov4l2videodec: Fix missing handling of resolution-change
Nicolas Dufresne [Thu, 19 May 2022 20:33:47 +0000 (16:33 -0400)]
v4l2videodec: Fix missing handling of resolution-change

The pool process function may poll and get the resolution-change event
whenever it is not possible to share our buffers. This typically happen
when downstream does not support GstVideoMeta.

Not handling this would cause the decoder thread to exit silently and the
pipeline to stall.

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

2 years agov4l2videodec: Downgrade to info resolution-change trace
Nicolas Dufresne [Thu, 19 May 2022 20:39:14 +0000 (16:39 -0400)]
v4l2videodec: Downgrade to info resolution-change trace

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

2 years agostructure: Fix serializing with new format inside arrays/lists
Thibault Saunier [Fri, 21 Jan 2022 23:31:27 +0000 (20:31 -0300)]
structure: Fix serializing with new format inside arrays/lists

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

2 years agova: Keep include's code style
Víctor Manuel Jáquez Leal [Sun, 22 May 2022 08:10:38 +0000 (10:10 +0200)]
va: Keep include's code style

Headers are in alphabetical order.

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

2 years agovafilter: Fix logging of unsupported alpha blending.
Víctor Manuel Jáquez Leal [Tue, 24 May 2022 11:19:45 +0000 (13:19 +0200)]
vafilter: Fix logging of unsupported alpha blending.

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

2 years agowebrtcbin: reuese the same fec/rtx/red payload types for the same media payload
Matthew Waters [Tue, 24 May 2022 04:36:36 +0000 (14:36 +1000)]
webrtcbin: reuese the same fec/rtx/red payload types for the same media payload

WHen bundling, if multiple medias are used with the same media payload, then
each of the fec/rtx/red additions would add a distinct payload.  This could
very easily overflow the available payload space.

Instead, track the relationship between the media payload value and
the relevant fec/rtx/red payload values and reuse them whenever
necessary, even when bundling.

e.g.

...
a=group:BUNDLE video0 video1
m=video 9 UDP/SAVPF 96 97
a=mid:video0
a=rtpmap:96 VP8/90000
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
...
m=video 9 UDP/SAVPF 96 97
a=mid:video1
a=rtpmap:96 VP8/90000
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
...

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

2 years agoshout2: fix compiler warnings and bump req to libshout >= 2.4.2
Tim-Philipp Müller [Mon, 23 May 2022 19:23:38 +0000 (20:23 +0100)]
shout2: fix compiler warnings and bump req to libshout >= 2.4.2

Fix compiler warnings with latest libshout version (2.4.6).

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

2 years agoshout2send: Adding send-title-info and user-agent options
László Károlyi [Sat, 14 May 2022 12:58:04 +0000 (14:58 +0200)]
shout2send: Adding send-title-info and user-agent options

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

2 years agotests: examples: Fix typo in QSV encoder example
Seungha Yang [Sun, 22 May 2022 15:04:03 +0000 (00:04 +0900)]
tests: examples: Fix typo in QSV encoder example

Fixing width adjustment

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

2 years agoqsv: Add AV1 encoder element
Seungha Yang [Sun, 22 May 2022 13:44:11 +0000 (22:44 +0900)]
qsv: Add AV1 encoder element

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

2 years agoqsvencoder: Move common property to baseclass
Seungha Yang [Sun, 22 May 2022 12:38:34 +0000 (21:38 +0900)]
qsvencoder: Move common property to baseclass

adapter-luid and device-path are common for all codecs

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

2 years agova: baseenc: No need to check the frame pointer in handle_frame().
He Junyan [Mon, 23 May 2022 07:03:03 +0000 (15:03 +0800)]
va: baseenc: No need to check the frame pointer in handle_frame().

No need to check the NULL pointer of "frame" in error handling, it
is assured non-NULL by base class and we already use it everywhere
in this function.

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

2 years agova: baseenc: include the "vacompat.h" for old version glib.
He Junyan [Sun, 22 May 2022 07:03:54 +0000 (15:03 +0800)]
va: baseenc: include the "vacompat.h" for old version glib.

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

2 years agova: vpp: enable compositor
U. Artie Eoff [Tue, 26 Apr 2022 16:07:26 +0000 (12:07 -0400)]
va: vpp: enable compositor

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

2 years agova: vpp: add compositor
U. Artie Eoff [Tue, 26 Apr 2022 16:06:17 +0000 (12:06 -0400)]
va: vpp: add compositor

New implementation of a VA-API compositor with blend feature.

Various chunks of code was taken from vavpp.

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

2 years agova: Apply the va base encoder to the vah264enc.
He Junyan [Fri, 25 Mar 2022 13:51:47 +0000 (21:51 +0800)]
va: Apply the va base encoder to the vah264enc.

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

2 years agova: Add the GstVaBaseEnc common object for all va encoders.
He Junyan [Fri, 25 Mar 2022 13:48:05 +0000 (21:48 +0800)]
va: Add the GstVaBaseEnc common object for all va encoders.

Just like the GstVaBaseDec and GstVaBaseTransform, this base encoder
will handle all common logic for all va encoders.

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

2 years agod3d11device: Enhance format enumeration and debugging
Seungha Yang [Sat, 14 May 2022 15:56:59 +0000 (00:56 +0900)]
d3d11device: Enhance format enumeration and debugging

* Enhance debug log to print human readable D3D11_FORMAT_SUPPORT flags
  value, instead of packed numeric flagset value.
* Only device supported format will be added to format table.
  Depending on device feature level (i.e., D3D9 feature devices),
  16bits formats will not be supported. Although there might be formats
  we deinfed but not supported, it will not be a major issue in practice
  since our D3D11 implementation does not support legacy devices already
  (known limitation) and also old d3dvideosink will be promoted in that case.

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

2 years agoci: run gst-inspect after the build
Jordan Petridis [Sat, 7 May 2022 01:45:09 +0000 (04:45 +0300)]
ci: run gst-inspect after the build

useful to quick inspect the elements built, later on we can
start verifying the list of elements against a known good list.

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

2 years agoci: run ninja install post build
Jordan Petridis [Thu, 19 May 2022 13:18:52 +0000 (16:18 +0300)]
ci: run ninja install post build

Make sure no weird regressions creep in.

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

2 years agopbutils: Add GST_PBUTILS_CAPS_DESCRIPTION_FLAG_METADATA and ONVIF XML Timed MetaData
Sebastian Dröge [Thu, 19 May 2022 09:17:59 +0000 (12:17 +0300)]
pbutils: Add GST_PBUTILS_CAPS_DESCRIPTION_FLAG_METADATA and ONVIF XML Timed MetaData

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

2 years agoqtdemux: Add support for ONVIF XML Timed MetaData
Sebastian Dröge [Thu, 19 May 2022 08:47:57 +0000 (11:47 +0300)]
qtdemux: Add support for ONVIF XML Timed MetaData

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

2 years agoqtdemux: Add parsing/dumping of nmhd / metx boxes
Sebastian Dröge [Thu, 19 May 2022 08:30:20 +0000 (11:30 +0300)]
qtdemux: Add parsing/dumping of nmhd / metx boxes

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

2 years agoqtdemux: Parse styp box for informational purposes
Sebastian Dröge [Thu, 19 May 2022 08:06:31 +0000 (11:06 +0300)]
qtdemux: Parse styp box for informational purposes

And include some more details in the debug logs for the ftyp box too.

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

2 years agov4l2: set default resolution if caps has no such information
Hou Qi [Tue, 10 May 2022 08:20:46 +0000 (16:20 +0800)]
v4l2: set default resolution if caps has no such information

Output may attemp to set the width and height to zero values if
caps has no such information, which will cause capture get invalid
dimensions. Then decoder reports negotiation failure.

So need to set default resolution if caps has no such information.
Real values can be set again until source change event is signaled.

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

2 years agojpegparse: Rewrite element.
Víctor Manuel Jáquez Leal [Wed, 22 Dec 2021 18:23:37 +0000 (19:23 +0100)]
jpegparse: Rewrite element.

Now it uses the JPEG parser in libgstcodecparsers, while the whole
code is simplified by relying more in baseparser class for tag
handling.

The element now signals chroma-format and default framerate is 0/1,
which is for still-images.

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

2 years agotests: jpegparse: Mark data as static.
Víctor Manuel Jáquez Leal [Sat, 25 Dec 2021 12:00:17 +0000 (13:00 +0100)]
tests: jpegparse: Mark data as static.

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

2 years agojpegformat: Use codecparsers' for JPEG markers.
Víctor Manuel Jáquez Leal [Wed, 22 Dec 2021 17:13:17 +0000 (18:13 +0100)]
jpegformat: Use codecparsers' for JPEG markers.

Instead of repeating JPEG markers definition, this patch uses those
defined in gstcodecparsers library.

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

2 years agojpegparse: Headers cleanup
Víctor Manuel Jáquez Leal [Wed, 22 Dec 2021 16:35:23 +0000 (17:35 +0100)]
jpegparse: Headers cleanup

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

2 years agortsp-media: Correct logic on GstRTSPStreamBlocking message reception
Patricia Muscalu [Mon, 16 May 2022 16:06:16 +0000 (18:06 +0200)]
rtsp-media: Correct logic on GstRTSPStreamBlocking message reception

We must take into account the receiving streams as well when calculating
the expected number of the received GstRTSPStreamBlocking messages.

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

2 years agodatachannel: Notify low buffered amount according to spec
Philippe Normand [Wed, 18 May 2022 15:54:53 +0000 (16:54 +0100)]
datachannel: Notify low buffered amount according to spec

Quoting
https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-bufferedamountlowthreshold

The bufferedAmountLowThreshold attribute sets the threshold at which the
bufferedAmount is considered to be low. When the bufferedAmount decreases from
above this threshold to **equal** or below it, the bufferedamountlow event fires.

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

2 years agogstreamer/gst/gstconfig.h.in: Add support for LoongArch
WANG Xuerui [Wed, 18 May 2022 02:04:08 +0000 (10:04 +0800)]
gstreamer/gst/gstconfig.h.in: Add support for LoongArch

While current and future LoongArch machines that are supposed to run
GStreamer all support unaligned accesses, there might be future
lower-end cores (e.g. the embedded product line) without such support,
and we may not want to penalize these use cases.

So, mark LoongArch as not supporting unaligned accesses for now, and
hope the compilers do a good job optimizing them. We can always flip
switch later.

Suggested-by: CHEN Tao <redeast_cn@outlook.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2443>

2 years agortcpbuffer: Allow padding on first reduced size packets
Thibault Saunier [Sun, 15 May 2022 16:53:12 +0000 (16:53 +0000)]
rtcpbuffer: Allow padding on first reduced size packets

It is valid to have the padding set to 1 on the first packet and it
happens very often from TWCC packets coming from libwebrtc. This means
that we were totally ignoring many TWCC packets.

Fix test that checked that a first packet with padding was not valid and
instead test a single twcc packet with padding to check precisely what
this patch was about.

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

2 years agotsmux: Make sure to set srcpad caps under all conditions before outputting the first...
Sebastian Dröge [Tue, 17 May 2022 11:15:40 +0000 (14:15 +0300)]
tsmux: Make sure to set srcpad caps under all conditions before outputting the first buffer

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1218

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

2 years agoci: use the correct vs toolcahin version for cerbero
Jordan Petridis [Mon, 16 May 2022 10:57:57 +0000 (13:57 +0300)]
ci: use the correct vs toolcahin version for cerbero

This seems to be a leftover from when we upgraded from vs15
to vs16.

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

2 years agoci: use LONGPATH for the windows container
Jordan Petridis [Fri, 13 May 2022 08:23:59 +0000 (11:23 +0300)]
ci: use LONGPATH for the windows container

Sometimes the CI might create paths that are bigger than the 260
character limit.

ex:
```
error: unable to create file subprojects/gst-integration-testsuites/testsuites/validate/h264/parse.trickmode_predicted.seek_trickmode_predicted/flow-expectations/log-parse-src-expected: Filename too long
```

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation

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

2 years agoci: remove windows-rust jobs
Jordan Petridis [Fri, 13 May 2022 08:23:45 +0000 (11:23 +0300)]
ci: remove windows-rust jobs

These are moved now into gstreamer-rs repository.

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/701

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

2 years agoci: re-enable artifacts upload for the windows jobs
Jordan Petridis [Mon, 9 May 2022 05:29:16 +0000 (08:29 +0300)]
ci: re-enable artifacts upload for the windows jobs

Hopefully the timeout issues won't affect the new runner

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

2 years agoci: Install Media Foundations on the windows container
Jordan Petridis [Tue, 22 Mar 2022 10:17:33 +0000 (12:17 +0200)]
ci: Install Media Foundations on the windows container

In order to do this, we need to switch to the Server container
image, instead of the ServerCore we were using till now.

This image also only has Server2022 base variants.

This is a continuation of:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1783

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

2 years agoges/videourisource: handle non-1/1 PAR source videos
Matthew Waters [Fri, 13 May 2022 00:23:54 +0000 (10:23 +1000)]
ges/videourisource: handle non-1/1 PAR source videos

The automatic scaling done by framepositioner does not account for the
par of the video source.

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

2 years agod3d11device: Don't print ERROR log on open failure
Seungha Yang [Mon, 16 May 2022 19:27:00 +0000 (04:27 +0900)]
d3d11device: Don't print ERROR log on open failure

Device open can be failed in various reasons, but it's unlikely
our problem

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

2 years agosdpdemux: Release request pads from rtpbin when freeing a stream
Sebastian Dröge [Tue, 17 May 2022 11:02:28 +0000 (14:02 +0300)]
sdpdemux: Release request pads from rtpbin when freeing a stream

Otherwise the pads of the rtpbin stay around forever and are leaked.

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

2 years agosplitmuxsrc: Re-queue sticky events after probing.
Jan Schmidt [Mon, 16 May 2022 19:21:19 +0000 (05:21 +1000)]
splitmuxsrc: Re-queue sticky events after probing.

When processing the first event after probing the
file and being activated, requeue sticky events
as there's no requirement that demuxers send tag
and other events again after a seek - that's
why they're sticky.

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

2 years agodeinterlace: Clean up error handling in chain and _push_history
Jan Alexander Steffens (heftig) [Mon, 16 May 2022 12:14:46 +0000 (14:14 +0200)]
deinterlace: Clean up error handling in chain and _push_history

- Consistently unref the chained buffer at the end of the chain
  function, if we're not handing it off to `gst_pad_push`. This avoids a
  few buffer leaks in the error paths in `_chain` and `_push_history`.
- When mapping the video frame fails, return a flow error instead of
  crashing.

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

2 years agosplitmuxsink: When flushing, exit handle_mq_input quickly
Jan Alexander Steffens (heftig) [Mon, 16 May 2022 12:40:41 +0000 (14:40 +0200)]
splitmuxsink: When flushing, exit handle_mq_input quickly

If we just break the loop, we might run into the `gop != NULL` assert
that follows it. Rather, exit immediately with flushing flow.

Also use this flushing mechanism when we release a pad. This avoids
having an extra flag.

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

2 years agosplitmuxsink: Avoid deadlock on release, harder
Jan Alexander Steffens (heftig) [Tue, 26 Jan 2021 15:33:25 +0000 (16:33 +0100)]
splitmuxsink: Avoid deadlock on release, harder

Unlock after broadcasting and wait for the pad to be free before
relocking the muxer, giving the input probe a chance to react to our
broadcast.

Improves the fix from
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/838.

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

2 years agoappsink: Fix race condition on caps handling
Alicia Boya García [Fri, 13 May 2022 11:31:55 +0000 (13:31 +0200)]
appsink: Fix race condition on caps handling

Background:

Whenever a caps event is received by appsink, the caps are stored in the
same internal queue as buffers. Only when enough buffers have been
popped from the queue to reach the caps, `priv->sample` gets its caps
updated to match, so that they are correct for the following buffers.

Note that as far as upstream elements are concerned, the caps of appsink
are updated immediately when the CAPS event is sent. Samples pulled from
appsink retain the old caps until a later buffer -- one that was sent by
upstream elements after the new caps -- is pulled.

The race condition:

When a flush is received, appsink clears the entire internal queue. The
caps of `priv->sample` are not updated as part of this process, and
instead remain as those of the sample that was last pulled by the user.

This leaves open a race condition where:
1. Upstream sends a new caps event, and possibly some buffers for the
   new caps.
2. Upstream sends a flush (possibly from a different thread).
3. Upstream sends a new buffer for the new caps. Since as far as
   upstream is concerned, appsink caps are the new caps already, no new
   CAPS event is sent.
4. The appsink user pulls a sample, having not pulled before enough
   samples to reach the buffers sent in step 1.

Bug: the pulled sample has the old caps instead of the new caps.

Fixing the race condition:

To avoid this problem, when a buffer is received after a flush,
`priv->sample`'s caps should be updated with the current caps before the
buffer is added to the internal queue.

Interestingly, before this patch, appsink already had code for this, in
gst_app_sink_render_common():

    /* queue holding caps event might have been FLUSHed,
     * but caps state still present in pad caps */
    if (G_UNLIKELY (!priv->last_caps &&
            gst_pad_has_current_caps (GST_BASE_SINK_PAD (psink)))) {
      priv->last_caps = gst_pad_get_current_caps (GST_BASE_SINK_PAD (psink));
      gst_sample_set_caps (priv->sample, priv->last_caps);
      GST_DEBUG_OBJECT (appsink, "activating pad caps %" GST_PTR_FORMAT,
          priv->last_caps);
    }

This code assumes `priv->last_caps` is reset when a flush is received,
which makes sense, but unfortunately, there was no code in the flush
code path resetting it.

This patch adds such code, therefore fixing the race condition. A unit
test demonstrating the bug and testing its behavior with the fix has
also been added.

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

2 years agovideoaggregator: unref temporary caps
U. Artie Eoff [Mon, 16 May 2022 16:34:36 +0000 (12:34 -0400)]
videoaggregator: unref temporary caps

The "possible_caps" needs unref after finished using to
avoid memory leak.

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

2 years agoqsv: Disable non-MSVC build on Windows
Seungha Yang [Mon, 16 May 2022 18:32:10 +0000 (03:32 +0900)]
qsv: Disable non-MSVC build on Windows

... and remove pointless UWP consideration that will never work.

Cross-compiled binary has an issue which causes deadlock.
Although cerbero will not build this plugin for non-MSVC build,
people can still build this plugin and may complain its brokenness.

See also
https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/854

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

2 years agowavparse: fix typo in debug message
Shingo Kitagawa [Mon, 16 May 2022 10:31:18 +0000 (19:31 +0900)]
wavparse: fix typo in debug message

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

2 years agoci: set the code page of powershell to utf-8
Jordan Petridis [Wed, 11 May 2022 06:40:15 +0000 (09:40 +0300)]
ci: set the code page of powershell to utf-8

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

2 years agoci: add gst-env.py to the changes rules
Jordan Petridis [Wed, 11 May 2022 06:15:46 +0000 (09:15 +0300)]
ci: add gst-env.py to the changes rules

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

2 years agogst-env: spawn a shell to execute commands on windows
Jordan Petridis [Mon, 9 May 2022 09:46:19 +0000 (12:46 +0300)]
gst-env: spawn a shell to execute commands on windows

On windows, if you are not using built-in commands you need
to pass the full path of your executable into the subprocess.call/
Popen syscall. ex `c:/foo/bar/baz.exe`. This get's long and is
not ergonomic when you want to run trivial task like:

`gst-env.py ninja` or `gst-inspect0.0` or `gst-validate-launcher`

Instead, on windows, always launch a shell to be able to resolve
the executable from the PATH.

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

2 years agoci: remove unused files
Jordan Petridis [Wed, 11 May 2022 11:10:28 +0000 (14:10 +0300)]
ci: remove unused files

These are leftovers of the gst-ci repo, before the mono repo
merge and can be removed now.

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