Commit graph

114515 commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig) 64833d2f12 .editorconfig: Add some indentation settings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1812>
2022-06-14 14:53:07 +00:00
James Hilliard 64ad82e00c multiqueue: fix warning: ‘is_query’ may be used uninitialized in this function
Fixes:
../plugins/elements/gstmultiqueue.c: In function ‘gst_multi_queue_loop’:
../plugins/elements/gstmultiqueue.c:2394:19: warning: ‘is_query’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 2394 |     if (object && !is_query)
      |                   ^~~~~~~~~

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2593>
2022-06-14 12:54:35 +00:00
Jan Schmidt 6e48a3ec28 adaptivedemux2: Improve reverse playback buffering.
In reverse playback, store the lowest running time in each GOP
as the input_time for buffering purposes. That means we end up
storing at least a complete GOP before declaring buffering
100%

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2510>
2022-06-14 13:06:49 +01:00
Jan Schmidt a4a805312d adaptivedemux2: reverse playback running times
Account for running time moving non-monotonically in
reverse playback by tracking the highest running time
seen at each point.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2510>
2022-06-14 13:06:49 +01:00
Matthew Waters 9df7a21ec9 vulkan: add vulkan overlay compositor element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2470>
2022-06-14 03:34:06 +00:00
Matthew Waters efe8e41b61 vkfullscreenquad: add support for disabling clearing
e.g. if drawing over the top of an existing image, we don'w want to
clear.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2470>
2022-06-14 03:34:05 +00:00
Matthew Waters fe8b4514e9 vkfullscreenquad: support setting blend operations
Allows e.g. blending with an existing image.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2470>
2022-06-14 03:34:05 +00:00
Matthew Waters 53596c2fc6 vkfullscreenaud: create the vulkan command pool upfront
Allows outside to reuse the same command buffer pool much more easily.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2470>
2022-06-14 03:34:05 +00:00
Matthew Waters 32487878d9 vulkan: add some missing GAutoPtr definitions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2470>
2022-06-14 03:34:05 +00:00
Matthew Waters a5e4199e88 vulkan: remove unneeded #ifdef for GAutoPtr
Not necessary anymore as we depend on a new enough Glib version

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2470>
2022-06-14 03:34:05 +00:00
Matthew Waters 81e601ccaa vulkan: move element register definition to relevant element headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2470>
2022-06-14 03:34:05 +00:00
Seungha Yang 7b39a09f9d d3d11converter: Add support for colorimetry conversion
Handle color primaries and gamma functions.
HDR <-> SDR conversion (tone mapping) should be implemented as well
but not a part of this patch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2581>
2022-06-14 05:04:53 +09:00
Seungha Yang 3a44d14ac8 d3d11convert: Don't passthrough if colorimetry conversion is required
Different input/output colorimetry requires conversion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2581>
2022-06-14 04:41:40 +09:00
Seungha Yang f3f905b491 d3d11window: Use SDR colorspace whenever possible
PQ uses completely different light level scale
and it should not be used for SDR bt2020.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2581>
2022-06-14 04:39:31 +09:00
Seungha Yang ac26860a80 d3d11converter: Rewrite conversion object
Rewriting GstD3D11Converter (equivalent to GstVideoConverter)
to optimize some conversion path and clean up.

* Extract YUV <-> RGB conversion matrix building method to
  utils. It will be used by other implementation
* Use calculated offset values for YCbCr <-> YPbPr conversion
  instead of hardcoded values
* Handle color range adjustment
* Move transform matrix building helper function to utils.
  The method will be used by other elements
* Use single constant buffer. Multiple constatne buffer for
  conversion pipeline is almost pointless
* Remove lots of duplicated HLSL code and split pixel shader
  code path into sampling -> colorspace conversion ->
  shader output packing
* Avoid floating point precision error around UV coordinates
* Optimize RGB -> YUV conversion path

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2581>
2022-06-14 04:37:30 +09:00
Benjamin Gaignard a6f8cc4b95 v4l2codecs: Add P010 pixel format
Copy V4L2_PIX_FMT_P010 define from linux header.
V4L2_PIX_FMT_P010 is the little endian definition of P010 so map
it GST_VIDEO_FORMAT_P010_10LE.
Add it v4l2 default video formats to allows v4l2 decoders to
enumerate and use it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2590>
2022-06-13 16:44:29 +02:00
Tim-Philipp Müller 5c8bbde1d4 docs: update technical howto in moving-plugins
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2583>
2022-06-10 11:40:45 +01:00
Nirbheek Chauhan 83081f8ea5 ci: Disable werror for documentation build
The documentation build is running on an ancient Fedora 30 image that
cannot be updated at present, and it's now triggering deprecation
warnings in system headers:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2568#note_1418956

Disable werror here, it's not actually useful.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2568>
2022-06-10 06:01:41 +00:00
Nirbheek Chauhan 604b92b9cb clock: Use g_atomic_rc_box for refcounting entry clocks
g_atomic_rc_box was added in GLib 2.58, and we require 2.62 now, so we
can fix the FIXME and use this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2568>
2022-06-10 06:01:41 +00:00
Tim-Philipp Müller 9d9e59622f 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>
2022-06-10 06:01:41 +00:00
Sebastian Dröge 92a4088621 decklink: Add support for 4K DCI, 8K/UHD2 and 8K DCI modes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2570>
2022-06-10 05:31:35 +00:00
Seungha Yang 44768b233a 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>
2022-06-09 20:28:10 +00:00
Seungha Yang e8fdf9177a 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>
2022-06-09 23:19:24 +09:00
Seungha Yang 45dd8bf35a d3d11: Add d3d11testsrc element
Adding Direct3D11 based videotestsrc element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2554>
2022-06-09 05:08:41 +09:00
Mathieu Duponchelle cf793d6678 -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>
2022-06-08 15:51:05 +00:00
Marc Leeman 8bdf7e8ad8 fix trivial distination -> destination
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2573>
2022-06-08 14:40:09 +02:00
Ignacio Casal Quinteiro 408f37c1d9 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>
2022-06-08 06:28:17 +00:00
Ignacio Casal Quinteiro caa5972abd 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>
2022-06-08 06:28:17 +00:00
Ignacio Casal Quinteiro 243f8e8882 osx: fix indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2251>
2022-06-08 06:28:17 +00:00
Ignacio Casal Quinteiro 57fed3c911 osxaudio: iterate device only if needed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2251>
2022-06-08 06:28:17 +00:00
Ignacio Casal Quinteiro a4a4d295a1 osxaudio: reduce scope of default device id variable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2251>
2022-06-08 06:28:17 +00:00
Jan Schmidt d76ba0292f 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>
2022-06-08 03:25:13 +00:00
Mengkejiergeli Ba 1fe5655c2a 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>
2022-06-08 02:48:53 +00:00
Bastien Nocera e37c462f87 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>
2022-06-07 17:36:26 +02:00
Víctor Manuel Jáquez Leal a8c658d5b7 va: Update plugin cache.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2522>
2022-06-07 12:02:21 +00:00
Víctor Manuel Jáquez Leal 045b6f5ea3 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>
2022-06-07 12:02:21 +00:00
Víctor Manuel Jáquez Leal 261714e25d vah264enc: Support default and none rate control.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2522>
2022-06-07 12:02:21 +00:00
Víctor Manuel Jáquez Leal e27ad1a273 va: encoder: Rate control property.
Fixes: #1241
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2522>
2022-06-07 12:02:21 +00:00
Philippe Normand c287711418 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>
2022-06-07 11:29:33 +00:00
Philippe Normand 779ca38229 webrtcdatachannel: Chain to parent class constructed
And add a debug log statement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2427>
2022-06-07 11:29:32 +00:00
Sebastian Dröge 47aab6c832 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>
2022-06-07 10:52:46 +00:00
Eric Knapp 1818374de2 decklinkvideosink: Add 3G-SDI Level A output support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2544>
2022-06-07 10:07:42 +03:00
He Junyan 91b7d3679e 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>
2022-06-07 02:28:49 +00:00
He Junyan e2392e2e3e h264parser: Fix memory leaks in parse_user_data_unregistered().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2551>
2022-06-06 19:21:58 +00:00
Jan Alexander Steffens (heftig) 5ebc9427d9 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>
2022-06-06 15:51:07 +00:00
Jan Alexander Steffens (heftig) 637406cdb1 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>
2022-06-06 15:09:09 +00:00
Sebastian Dröge e5f9bb973f flvdemux: Actually make use of the debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2552>
2022-06-06 14:36:41 +00:00
Robert Mader eb915b662a 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>
2022-06-06 14:36:39 +02:00
Robert Mader 8c3e33d494 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>
2022-06-06 14:36:39 +02:00
Jan Alexander Steffens (heftig) d86ad30be2 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>
2022-06-06 00:30:15 +02:00