platform/upstream/gstreamer.git
23 months agoBump GLib requirement to >= 2.62
Tim-Philipp Müller [Wed, 6 Apr 2022 11:56:30 +0000 (12:56 +0100)]
Bump GLib requirement to >= 2.62

Can't require 2.64 yet because of
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/323

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

23 months agodecklink: Add support for 4K DCI, 8K/UHD2 and 8K DCI modes
Sebastian Dröge [Wed, 8 Jun 2022 07:42:18 +0000 (10:42 +0300)]
decklink: Add support for 4K DCI, 8K/UHD2 and 8K DCI modes

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

23 months agoqsvencoder: Do not copy if input is D3D11 texture
Seungha Yang [Wed, 1 Jun 2022 21:06:48 +0000 (06:06 +0900)]
qsvencoder: Do not copy if input is D3D11 texture

In case that input is D3D11 texture, QSV seems to work regardless
of the alignment. Actually the alignment requirement seems to make
only sense for system memory.
Other Intel GPU dependent implementations (new VA encoder, and MediaFoundation)
do not require such alignment nor other vendor specific ones (NVENC and AMF)

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

23 months agod3d11decoder: Fix for alternate interlacing signalling
Seungha Yang [Thu, 9 Jun 2022 14:19:24 +0000 (23:19 +0900)]
d3d11decoder: Fix for alternate interlacing signalling

Don't set d3d11+interlace caps feature. None of d3d11 elements
support it

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

23 months agod3d11: Add d3d11testsrc element
Seungha Yang [Sat, 4 Jun 2022 13:33:34 +0000 (22:33 +0900)]
d3d11: Add d3d11testsrc element

Adding Direct3D11 based videotestsrc element

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

23 months ago-bad/docs: be more selective about header files to exclude
Mathieu Duponchelle [Wed, 8 Jun 2022 14:38:00 +0000 (16:38 +0200)]
-bad/docs: be more selective about header files to exclude

A few header files in -bad contain comments that start with the
/** gtk-doc pattern, but should not actually be parsed (and warned
about as such).

Previously, we were using far-reaching wildcard patterns to avoid
parsing those, but this had the unintended side effect of also
excluding legitimate files, and creating confusion when comments
were not parsed from those.

Switch to excluding specific files instead.

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

23 months agofix trivial distination -> destination
Marc Leeman [Wed, 8 Jun 2022 12:11:57 +0000 (14:11 +0200)]
fix trivial distination -> destination

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

23 months agoosxaudio: remove usage of goto
Ignacio Casal Quinteiro [Thu, 21 Apr 2022 10:47:31 +0000 (12:47 +0200)]
osxaudio: remove usage of goto

It is easier to follow the code without the goto now

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

23 months agoosxaudio: support hidden devices
Ignacio Casal Quinteiro [Wed, 30 Mar 2022 10:59:46 +0000 (12:59 +0200)]
osxaudio: support hidden devices

macOS features hidden devices. These are devices that will
not be shown in the macOS UIs and that cannot be retrieved
without having the specific UID of the hidden device. There
are cases when you might want to have a hidden device, for example
when having a virtual speaker that forwards the data to a virtual
hidden input device from which you can then grab the audio.
The blackhole project supports these hidden devices and
this patch provides a way that if the device id is a hidden
device it will use it instead of check the hardware list of devices
to understand if the device is valid.

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

23 months agoosx: fix indent
Ignacio Casal Quinteiro [Wed, 20 Apr 2022 16:12:02 +0000 (18:12 +0200)]
osx: fix indent

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

23 months agoosxaudio: iterate device only if needed
Ignacio Casal Quinteiro [Wed, 30 Mar 2022 10:48:02 +0000 (12:48 +0200)]
osxaudio: iterate device only if needed

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

23 months agoosxaudio: reduce scope of default device id variable
Ignacio Casal Quinteiro [Wed, 30 Mar 2022 07:59:59 +0000 (09:59 +0200)]
osxaudio: reduce scope of default device id variable

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

23 months agoamc: Add H.265 encoder mapping.
Jan Schmidt [Thu, 26 May 2022 19:15:13 +0000 (05:15 +1000)]
amc: Add H.265 encoder mapping.

Add mime type mapping to enable the use of Android H.265 encoders

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

23 months agomsdkdec: Decoder should use its own pool when downstream allocator is not recognizable
Mengkejiergeli Ba [Fri, 13 May 2022 09:21:25 +0000 (17:21 +0800)]
msdkdec: Decoder should use its own pool when downstream allocator is not recognizable

Msdkdec should use it own pool when the allocation from downstream query
is not any msdk_allocator (i.e. msdk_video_allocator,
msdk_dmabuf_allocator and msdk_system_allocator). Otherwise, when using
pipeline "msdkh264dec ! vah264enc !" to transcode a not 16-bit-aligned
stream (i.e. 1920x1080), the transcoding will fail due to the size
mismatch issue between decoder pool and encoder pool.

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

23 months agogtk: Fix double-free when OpenGL can't be initialised
Bastien Nocera [Tue, 7 Jun 2022 15:31:43 +0000 (17:31 +0200)]
gtk: Fix double-free when OpenGL can't be initialised

gtk_gl_area_get_error() doesn't return a copy of the error, but just the
error. If initialising OpenGL fails, then GtkGstGLWidget will consume
the error, and cause GTK to try and display freed memory.

==50914== Invalid read of size 8
==50914==    at 0x4C4CB8A: gtk_gl_area_draw_error_screen (gtkglarea.c:663)
==50914==    by 0x4C4CB8A: gtk_gl_area_draw (gtkglarea.c:687)
==50914==    by 0x4E061CA: gtk_widget_draw_internal (gtkwidget.c:7084)
==50914==    by 0x4BAEFB1: gtk_container_propagate_draw (gtkcontainer.c:3854)
==50914==    by 0x4D4B6BF: gtk_stack_render (gtkstack.c:2207)
==50914==    by 0x4BB4B03: gtk_css_custom_gadget_draw (gtkcsscustomgadget.c:159)
==50914==    by 0x4BBA4C4: gtk_css_gadget_draw (gtkcssgadget.c:885)
==50914==    by 0x4D4D780: gtk_stack_draw (gtkstack.c:2119)
==50914==    by 0x4E061CA: gtk_widget_draw_internal (gtkwidget.c:7084)
==50914==    by 0x4BAEFB1: gtk_container_propagate_draw (gtkcontainer.c:3854)
==50914==    by 0x4BAF0C3: gtk_container_draw (gtkcontainer.c:3674)
==50914==    by 0x4E061CA: gtk_widget_draw_internal (gtkwidget.c:7084)
==50914==    by 0x4BAEFB1: gtk_container_propagate_draw (gtkcontainer.c:3854)
==50914==  Address 0x187a0818 is 8 bytes inside a block of size 16 free'd
==50914==    at 0x48480E4: free (vg_replace_malloc.c:872)
==50914==    by 0x49A5B8C: g_free (gmem.c:218)
==50914==    by 0x49C1013: g_slice_free1 (gslice.c:1183)
==50914==    by 0x4990DE4: g_error_free (gerror.c:870)
==50914==    by 0x4990FE9: g_clear_error (gerror.c:1052)
==50914==    by 0x1A489780: _get_gl_context (gtkgstglwidget.c:540)
==50914==    by 0x1A4863CB: gst_gtk_invoke_func (gstgtkutils.c:39)
==50914==    by 0x49A3834: g_main_context_invoke_full (gmain.c:6137)
==50914==    by 0x1A486450: gst_gtk_invoke_on_main (gstgtkutils.c:59)
==50914==    by 0x1A48A29E: gtk_gst_gl_widget_init_winsys (gtkgstglwidget.c:632)
==50914==    by 0x1A4887E7: gst_gtk_gl_sink_start (gstgtkglsink.c:267)
==50914==    by 0x6579810: gst_base_sink_change_state (gstbasesink.c:5662)
==50914==  Block was alloc'd at
==50914==    at 0x484586F: malloc (vg_replace_malloc.c:381)
==50914==    by 0x49A9278: g_malloc (gmem.c:125)
==50914==    by 0x49C1BA5: g_slice_alloc (gslice.c:1072)
==50914==    by 0x49C3BCC: g_slice_alloc0 (gslice.c:1098)
==50914==    by 0x499096B: g_error_allocate (gerror.c:708)
==50914==    by 0x4990AF1: UnknownInlinedFun (gerror.c:722)
==50914==    by 0x4990AF1: g_error_copy (gerror.c:892)
==50914==    by 0x4C4B9F9: gtk_gl_area_set_error (gtkglarea.c:1036)
==50914==    by 0x4C4BAF7: gtk_gl_area_real_create_context (gtkglarea.c:346)
==50914==    by 0x4B21B28: _gtk_marshal_OBJECT__VOIDv (gtkmarshalers.c:2730)
==50914==    by 0x4920B78: UnknownInlinedFun (gclosure.c:893)
==50914==    by 0x4920B78: g_signal_emit_valist (gsignal.c:3406)
==50914==    by 0x4920CB2: g_signal_emit (gsignal.c:3553)
==50914==    by 0x4C4B927: gtk_gl_area_realize (gtkglarea.c:308)

Reproduced by running:
MESA_GL_VERSION_OVERRIDE=2.7 totem

See https://gitlab.gnome.org/GNOME/totem/-/issues/522

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

23 months agova: Update plugin cache.
Víctor Manuel Jáquez Leal [Mon, 6 Jun 2022 08:56:12 +0000 (10:56 +0200)]
va: Update plugin cache.

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

23 months agovah264enc: Guard logging functions
Víctor Manuel Jáquez Leal [Sun, 29 May 2022 11:43:29 +0000 (13:43 +0200)]
vah264enc: Guard logging functions

.. and use spec for rate control rather than static switch.

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

23 months agovah264enc: Support default and none rate control.
Víctor Manuel Jáquez Leal [Mon, 30 May 2022 08:20:11 +0000 (10:20 +0200)]
vah264enc: Support default and none rate control.

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

23 months agova: encoder: Rate control property.
Víctor Manuel Jáquez Leal [Sun, 29 May 2022 10:09:05 +0000 (12:09 +0200)]
va: encoder: Rate control property.

Fixes: #1241
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2522>

23 months agowebrtcbin: Add a prepare-data-channel GObject signal
Philippe Normand [Mon, 30 May 2022 10:26:24 +0000 (11:26 +0100)]
webrtcbin: Add a prepare-data-channel GObject signal

This new signal allows data-channel consumers to configure signal handlers on a
newly created data-channel, before any data or state change has been notified.

The webrtcin unit-tests were refactored to make use of this new signal.

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

23 months agowebrtcdatachannel: Chain to parent class constructed
Philippe Normand [Mon, 16 May 2022 15:43:57 +0000 (16:43 +0100)]
webrtcdatachannel: Chain to parent class constructed

And add a debug log statement.

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

23 months agoflvdemux: Make use of the streams API if used in a streams-aware bin
Sebastian Dröge [Mon, 6 Jun 2022 09:31:52 +0000 (12:31 +0300)]
flvdemux: Make use of the streams API if used in a streams-aware bin

This allows adding audio/video streams after 6s.

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

23 months agodecklinkvideosink: Add 3G-SDI Level A output support
Eric Knapp [Thu, 2 Jun 2022 14:32:28 +0000 (10:32 -0400)]
decklinkvideosink: Add 3G-SDI Level A output support

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

23 months agoDocs: Add the design document for DMA buffer sharing.
He Junyan [Mon, 6 Dec 2021 08:30:46 +0000 (16:30 +0800)]
Docs: Add the design document for DMA buffer sharing.

Co-authored-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1431>

23 months agoh264parser: Fix memory leaks in parse_user_data_unregistered().
He Junyan [Sat, 4 Jun 2022 07:05:05 +0000 (15:05 +0800)]
h264parser: Fix memory leaks in parse_user_data_unregistered().

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

23 months agortmp2: Fix allocation of GstRtmpMeta
Jan Alexander Steffens (heftig) [Sat, 4 Jun 2022 15:23:00 +0000 (17:23 +0200)]
rtmp2: Fix allocation of GstRtmpMeta

Use the right size.

On 64-bit platforms, `GstMetaInfo` is larger than `GstRtmpMeta`, which
masked this bug. On 32-bit platforms, it causes crashes. Thanks to
@maxatka for discovering this.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1721
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2553>

23 months agoaacparse: Avoid mismatch between src_caps and output_header_type
Jan Alexander Steffens (heftig) [Fri, 3 Jun 2022 16:35:54 +0000 (18:35 +0200)]
aacparse: Avoid mismatch between src_caps and output_header_type

If our downstream caps didn't intersect, we attempted to convert between
raw and ADTS stream formats, if possible. If the caps still did not
intersect, we then used the modified `src_caps` but left the
`output_header_type` unmodified.

This caused a mismatch between caps and actual stream format.

Avoid this by first copying the `src_caps` to `convcaps` for the
additional intersection tests, replacing `src_caps` if we succeed.

While we're here, clean up the code a bit and remove the `codec_data`
field from outgoing ADTS caps.

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

23 months agoflvdemux: Actually make use of the debug category
Sebastian Dröge [Sat, 4 Jun 2022 07:27:09 +0000 (10:27 +0300)]
flvdemux: Actually make use of the debug category

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

23 months agogstwaylandsink: Add support for the "render-rectangle" property
Robert Mader [Thu, 2 Jun 2022 14:38:55 +0000 (16:38 +0200)]
gstwaylandsink: Add support for the "render-rectangle" property

We already implement the `set_render_rectangle` videooverlay interface,
thus install the videooverlay property accordingly.

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

23 months agogstwayland: Move reusable parts of the waylandsink into a library
Robert Mader [Tue, 4 Jan 2022 14:20:41 +0000 (15:20 +0100)]
gstwayland: Move reusable parts of the waylandsink into a library

In preparation for the new element `GstGtkWaylandSink`, move reusable
parts out of `GstWaylandSink` into the already exisiting but very
barebone library.

Notable changes include:
 - the `GstWaylandVideo` interface was dropped
 - support for `wl-shell` was dropped
 - lots of renaming in order to match established naming patterns
 - lots of code modernisations, reducing boilerplate
 - members were made private wherever possible

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

23 months agoopencv: Allow building against 4.6.x
Jan Alexander Steffens (heftig) [Sun, 5 Jun 2022 22:30:15 +0000 (00:30 +0200)]
opencv: Allow building against 4.6.x

Replace the broken version checks with one modeled after
`GLIB_CHECK_VERSION`.

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

23 months agovalidate: Fix running as a tracer
Thibault Saunier [Mon, 30 May 2022 18:00:55 +0000 (14:00 -0400)]
validate: Fix running as a tracer

We need to rebuild runner.c as this is where the plugin is defined

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

23 months agowebrtcbin: Reject answers that don't contain the same number of m-line as offer
Olivier Crête [Mon, 30 May 2022 20:31:38 +0000 (16:31 -0400)]
webrtcbin: Reject answers that don't contain the same number of m-line as offer

Otherwise, it segfaults later. Also add test to validate this.

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

23 months agorfbsrc: add uri interface
Marc Leeman [Tue, 15 Mar 2022 11:44:20 +0000 (12:44 +0100)]
rfbsrc: add uri interface

Adding a uri interface enables plugging in RFB/VNC sources to anything
that makes use of uridecodebin:

gst-play-1.0 rfb://:password@10.40.216.180:5903?shared=1

Use userinfo to pass user (ignored) and password, other key/value pairs
can be encoded in the query part of the URI (see shared)

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

23 months agogst-env: Add support for PowerShell 7
Seungha Yang [Thu, 2 Jun 2022 18:22:03 +0000 (03:22 +0900)]
gst-env: Add support for PowerShell 7

The executable binary name of "PowerShell 7" is "pwsh.exe"
which is different from system default installed
"Windows PowerShell (version 5.x or older)"

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

23 months agovideoparse: rename from _free to _clear
Andoni Morales Alastruey [Mon, 16 May 2022 22:36:24 +0000 (00:36 +0200)]
videoparse: rename from _free to _clear

The function does not free the structure but the data
contained within.

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

23 months agovideo: add new video-sei.h header to the list of video_headers
Andoni Morales Alastruey [Mon, 16 May 2022 17:29:10 +0000 (19:29 +0200)]
video: add new video-sei.h header to the list of video_headers

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

23 months agoh264parse: fix leak in user data unregistered
Andoni Morales Alastruey [Mon, 16 May 2022 12:21:53 +0000 (14:21 +0200)]
h264parse: fix leak in user data unregistered

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

23 months agotest: update tests to include the new meta
Andoni Morales Alastruey [Mon, 16 May 2022 10:46:06 +0000 (12:46 +0200)]
test: update tests to include the new meta

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

23 months agoFix documentation
Andoni Morales Alastruey [Sun, 27 Feb 2022 18:41:12 +0000 (18:41 +0000)]
Fix documentation

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

23 months agoh264parse: add unit test for Precision Time Stamp in SEI messages
Brad Hards [Thu, 17 Feb 2022 04:55:19 +0000 (15:55 +1100)]
h264parse: add unit test for Precision Time Stamp in SEI messages

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

23 months agoh264parse: fix copying of data and UUID
Brad Hards [Thu, 17 Feb 2022 04:55:19 +0000 (15:55 +1100)]
h264parse: fix copying of data and UUID

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

23 months agoh264parse: add support Precision Time Stamp in SEI messages
Andoni Morales Alastruey [Sun, 19 Dec 2021 18:14:05 +0000 (19:14 +0100)]
h264parse: add support Precision Time Stamp in SEI messages

Expose User Data Unregistered as a new Meta and add
API to parse Precision Time Stamp (ST 0604).

Fixes #927

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

23 months agomeson: cuda: Add missing override_dependency()
Seungha Yang [Wed, 1 Jun 2022 17:22:19 +0000 (02:22 +0900)]
meson: cuda: Add missing override_dependency()

Required for GstCuda library to be consumed via "gstreamer-cuda-1.0"
dependency.

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

23 months agocuda: Fix uninitialized debug category
Seungha Yang [Thu, 2 Jun 2022 12:25:38 +0000 (21:25 +0900)]
cuda: Fix uninitialized debug category

Make sure debug category init

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

23 months agomsdkav1enc: Reorder pts
Mengkejiergeli Ba [Fri, 22 Apr 2022 06:46:07 +0000 (06:46 +0000)]
msdkav1enc: Reorder pts

This is a workaround for pts because oneVPL cannot handle the pts
correctly when there is b-frames. We first cache the input frame pts in
a queue then retrive the smallest one for the output encoded frame as
we always output the coded frame when this frame is displayable.

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

23 months agomsdkav1enc: Add b-pyramid and p-pyramid
Mengkejiergeli Ba [Thu, 31 Mar 2022 06:45:03 +0000 (06:45 +0000)]
msdkav1enc: Add b-pyramid and p-pyramid

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

23 months agomsdkav1enc: Add tile for encoding
Mengkejiergeli Ba [Thu, 31 Mar 2022 06:33:55 +0000 (06:33 +0000)]
msdkav1enc: Add tile for encoding

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

23 months agomsdk: Add msdkav1enc element
Mengkejiergeli Ba [Thu, 31 Mar 2022 06:03:36 +0000 (06:03 +0000)]
msdk: Add msdkav1enc element

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

23 months agosoup: fix soup debug category
Stéphane Cerveau [Wed, 1 Jun 2022 14:14:24 +0000 (16:14 +0200)]
soup: fix soup debug category

Use soup debug category in souploader
for soup plugin element load.

Inititalize properly soup utils category.

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

23 months agoamfencoder: always empty the queue when pushing output samples
Jakub Adam [Tue, 31 May 2022 18:39:29 +0000 (20:39 +0200)]
amfencoder: always empty the queue when pushing output samples

gst_amf_encoder_try_output() pushes at most one output buffer downstream
although more may be ready. As a consequence, output samples will keep
queueing up in AMFComponent whenever QueryOutput() returns AMF_REPEAT
(and do_wait is FALSE). This has negative impact on latency when the
video being encoded is a live stream.

In order to avoid it, always retrieve and push all samples available in
AMFComponent's output queue at once.

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

23 months agohlsdemux2: Adjust debug log level
Seungha Yang [Sat, 28 May 2022 21:05:27 +0000 (06:05 +0900)]
hlsdemux2: Adjust debug log level

HLS manifest might not be represented by a single common caps
when different codecs are mixed in a playlist, but it
does not seem to be a critical issue we need to warn.

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

23 months agobasetransform: handle gst_base_transform_query_caps() returning NULL
Guillaume Desmottes [Wed, 1 Jun 2022 07:25:29 +0000 (09:25 +0200)]
basetransform: handle gst_base_transform_query_caps() returning NULL

If gst_base_transform_transform_caps() returns NULL, gst_base_transform_query_caps()
will return NULL as well.

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

23 months agoclock: Avoid creating a weakref with every entry
Jan Alexander Steffens (heftig) [Wed, 18 May 2022 15:03:27 +0000 (17:03 +0200)]
clock: Avoid creating a weakref with every entry

Creating and destroying weakrefs takes a write lock on a global
`GRWLock`. This makes for a very contended lock when the pipeline has
many synchronizing elements.

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

23 months agovideo: Fix NV12_16L32 size calculation
Nicolas Dufresne [Fri, 27 May 2022 18:18:30 +0000 (14:18 -0400)]
video: Fix NV12_16L32 size calculation

The subsampling of the second plane was not taken into account, resulting in a
16bit per pixel buffers instead of 12.

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

23 months agobasetransform: fix critical if transform_caps() returned NULL
Guillaume Desmottes [Tue, 31 May 2022 12:27:51 +0000 (14:27 +0200)]
basetransform: fix critical if transform_caps() returned NULL

klass->transform_caps() may return NULL, which was raising this
critical:

  GStreamer-CRITICAL **: 12:23:56.243: gst_caps_is_subset: assertion 'subset != NULL' failed

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

23 months agoadaptivedemux2: fix plugin/element init
Stéphane Cerveau [Mon, 2 May 2022 14:55:34 +0000 (16:55 +0200)]
adaptivedemux2: 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 categories properly

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

23 months agodirectshow: Fix for uninitialized debug category warning
Seungha Yang [Sat, 28 May 2022 21:55:27 +0000 (06:55 +0900)]
directshow: Fix for uninitialized debug category warning

A method in the code is used in another place (device provider)

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

23 months agova: Register base classes as abstract.
Víctor Manuel Jáquez Leal [Sun, 29 May 2022 10:42:52 +0000 (12:42 +0200)]
va: Register base classes as abstract.

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

23 months agova: encoder: Use entrypoint type.
Víctor Manuel Jáquez Leal [Sun, 29 May 2022 10:09:22 +0000 (12:09 +0200)]
va: encoder: Use entrypoint type.

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

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>