Commit graph

4862 commits

Author SHA1 Message Date
Matthew Waters 13f4066580 webrtc: add check for negotiation on transceiver direction changes
As required by the webrtc specification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Nirbheek Chauhan 639f8a24ae webrtc/js: Support renegotiation during a call correctly
When a video track is muted, hide the video element to differentiate
it from a track that is stuck because we stopped receiving RTP data.
Show it again when it is unmuted.

When a video track is removed, remove the video element. It will be
re-added on renegotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Nirbheek Chauhan 57b6c743ef webrtc/js: Remove obsolete mozilla stun server
Mozilla's public stun server is gone. Remove it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Nirbheek Chauhan 80603746af webrtc/js: Support pressing "enter" to connect
I press "enter" every time which doesn't work and then I click
"Connect", so let's fix that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
He Junyan 5a3b31108d Doc: Dmabuf: Set drm caps' format field to DMA_DRM
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
He Junyan e14d4e08c1 test: Update all video related tests because of adding DMA_DRM format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
Víctor Manuel Jáquez Leal 8b38614173 video: add GST_VIDEO_DMA_DRM_CAPS_MAKE
It is requried this macro because it doesn't define format field, neither
drm-format which is suppossed to be generated in run-time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
He Junyan bc48588818 video: dma: Set DMA caps' format field to DMA_DRM
The current way of dma caps uses the drm-format to replace the orginal
format field. The absence of format field means it can accept all formats.
It causes problems when clipping with other old DMA or video/x-raw(ANY)
caps, the result will contain both format field and drm-format field,
which is not valid DMA caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
He Junyan 94c94d34dc video: Add new GST_VIDEO_FORMAT_DMA_DRM video format
This GST_VIDEO_FORMAT_DMA_DRM is introduced for DMABuf kind feature
usage. It represent the DMA DRM kind memory. And like the ENCODED
format, it should not be interpreted and mapped as normal video format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
Sebastian Dröge e5be080042 gtk: Update subproject from 4.9.2 to 4.10.3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5065>
2023-07-19 07:38:36 +00:00
Philippe Normand 4404e7203c decodebin3: Fix slot input linking when the associated stream has changed
Setting the input field on the empty slot prevents future linking of it and will
result in flow errors later on.

This was observed in WebKit's MediaStream source element, when it changes the
caps on one of its associated streams, from an encoded format to a raw video
format. The associated stream-id on the sticky stream-start event doesn´t
change, but the element creates a new GstStream with a different ID and sets it
on the stream-start event. Stream parsing is disabled in urisourcebin, so
decodebin3 handles the parsing. Without this patch we would end-up with unlinked
pads in decodebin3 after switching to the raw video format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5048>
2023-07-19 01:24:30 +00:00
Philippe Normand cec774b653 query: Add a quark for SELECTABLE query type
So that `gst_query_type_get_name()` won't return "unknown" for this type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5048>
2023-07-19 01:24:30 +00:00
Ruslan Khamidullin 9ec5ee2984 video: add extensive tests for gst_video_time_code_is_valid()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5028>
2023-07-18 13:46:57 +00:00
Ruslan Khamidullin 53582b7430 video: accept timecode of 119.88 (120/1.001) FPS
The drop-frame rules are specified in “SMPTE ST 12-3:2016” and are
consistent with the traditional ones:

“

To minimize fractional time deviation from real time, the first two
super-frame numbers (00 and 01) shall be omitted from the count at the
start of each minute except minutes 00, 10, 20, 30, 40, and 50. Thus the
first eight frame numbers (0 through 7) are omitted from the count at
the start of each minute except minutes 00, 10, 20, 30, 40, and 50.
”

Where “super-frame” is a group of 4 frames for 120 FPS.

Fixes #2797

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5028>
2023-07-18 13:46:57 +00:00
Edward Hervey 7e7f02f4f4 decodebin3: Rename and refactor function
It was doing a bit more than it did initially, update the name accordingly.

Refactor slightly for visibility

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5052>
2023-07-18 11:42:13 +02:00
Edward Hervey 1fd7c2c17a decodebin3: Remove dead code
Was never used since initial commit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5052>
2023-07-18 11:42:13 +02:00
Andoni Morales Alastruey fcf2d8c350 videodecoder: fix segfault copying buffer metas
The current implementation copies metas without checking if the buffer
is writable.

The operation that needs to be done, replacing the input buffer and
copying the metas, is only part of that process. We create a new function
that does both.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4912>
2023-07-18 07:39:02 +00:00
Bastien Nocera 913f6013a8 gtk: Fix critical caused by pointer movement when stream is getting ready
This check fixes a critical warning that can happen when a pointer motion
happens and the video doesn't have its width/height information available.

GStreamer-Video-CRITICAL **: gst_video_center_rect: assertion 'src->h != 0' failed

 #0  g_logv (log_domain=0x7ffff705e176 "GStreamer-Video", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../../../../Projects/jhbuild/glib/glib/gmessages.c:1422
 #1  0x00007ffff7e1a81d in g_log (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff7e77a9d "%s: assertion '%s' failed") at ../../../../Projects/jhbuild/glib/glib/gmessages.c:1460
 #2  0x00007ffff7e1b749 in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=<optimized out>, expression=<optimized out>) at ../../../../Projects/jhbuild/glib/glib/gmessages.c:2930
 #3  0x00007ffff701d90b in gst_video_sink_center_rect (src=..., dst=..., result=result@entry=0x7fffffffc6d0, scaling=scaling@entry=1) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideosink.c:105
 #4  0x00007fffe5652dbb in _fit_stream_to_allocated_size (result=0x7fffffffc6d0, allocation=0x7fffffffc6c0, base_widget=0x9396f0) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c:326
 #5  gtk_gst_base_widget_display_size_to_stream_size (base_widget=base_widget@entry=0x9396f0, x=1207.7109375, y=811.84765625, stream_x=stream_x@entry=0x7fffffffc720, stream_y=stream_y@entry=0x7fffffffc728) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c:344
 #6  0x00007fffe5651a4b in gst_gtk_base_sink_navigation_send_event (navigation=0x5ff990, event=0x178a730) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gstgtkbasesink.c:340
 #7  0x00007fffe5652432 in gtk_gst_base_widget_motion_event (widget=<optimized out>, event=event@entry=0x1f14b60) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c:404

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5049>
2023-07-17 14:53:43 -04:00
Hou Qi 4f5e881e2a riff: add more h265 fourcc formats
Regards hevc/HEVC/hev1/HEV1 fourcc as video/x-h265 format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5031>
2023-07-17 13:17:20 +00:00
Mathieu Duponchelle 6305db1279 base/video-converter: downgrade log level
We don't need to know about routine operation of video conversion
at GST_DEBUG=5 level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4993>
2023-07-17 07:39:46 +00:00
Nirbheek Chauhan cc6ccd881e meson: Fix fontconfig build failure with MSYS2 gperf
The CI image now contains MSYS2 gperf, and the build fails due to CRLF
newlines in files generated by the build files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5043>
2023-07-17 05:52:24 +00:00
Olivier Crête e8731f26de docs: Replace gst-omx with v4l2 in memory allocation example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4976>
2023-07-16 19:10:03 +00:00
Olivier Crête 48c43e5b7f gst-omx: Retire the whole package
The OpenMAX standard is long dead and even the Raspberry Pi OS
no longer supports it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4976>
2023-07-16 19:10:03 +00:00
Nirbheek Chauhan 62d3e8fc32 meson: Ensure that soup plugin is built on Windows
The libpsl subproject wasn't building successfully and CI didn't
notice because:

1. The plugin wasn't explicitly enabled
2. Even when the plugin is explicitly enabled, the dep is not required
   at build time when not building a static plugin

So fix all of these issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5038>
2023-07-15 05:06:35 +00:00
Seungha Yang fdb3cdf1fd qsv: Remove x86_64 constraint on Linux
Updated oneVPL SDK supports 32bit and ARM build

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5032>
2023-07-14 13:12:29 +00:00
Seungha Yang 25d10acaa2 qsv: Re-apply MinGW build workaround
Apply the changes of the commits
c80132e4a3 and
23261bccbb

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5032>
2023-07-14 13:12:29 +00:00
Seungha Yang 1bc5dc778c qsv: Update oneVPL SDK version to v2023.3.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5032>
2023-07-14 13:12:29 +00:00
Michael Tretter a92a64ae67 v4l2videoenc: remove empty sink_query
The sink_query() function simply calls the sink_query() function of the parent
videoencoder class. Remove the override to simply directly call the parent's
function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5034>
2023-07-13 16:25:06 +00:00
Michael Tretter a28b81fb4f v4l2videoenc: replace custom QUERY_CAPS handling with getcaps callback
The videoencoder base class uses getcaps() to ask a subclass for the caps in its
sink_query_default() implementation.

Replace the custom handling of the QUERY_CAPS in the v4l2videoenc with an
implementation of getcaps() that returns the caps that are supported by the
v4l2videoenc to return these caps in the query.

This getcaps() implementation also calls the provided proxy_getcaps(), which
sends a caps query to downstream. This fixes the v4l2videoenc element to respect
limits of downstream elements in a sink query.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5034>
2023-07-13 16:25:06 +00:00
Olivier Crête 98217f1892 debug-viewer: Remove unnecessary call to gettext.bind_textdomain_codeset()
It has been deprecated in Python 3.8 and removed in 3.10

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5027>
2023-07-13 15:07:20 +00:00
Seungha Yang 9a902afce4 codecs: Use release_frame() instead of drop_frame()
drop_frame() will post QoS message which is not intended here

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5024>
2023-07-13 13:48:46 +00:00
Seungha Yang 45766f2448 codecs: Propagate downstream flow ERROR
Don't translate downstream flow ERROR to OK

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5024>
2023-07-13 13:48:46 +00:00
Nirbheek Chauhan 576ec6e72e d3d11: Fix build on MSYS2 GCC
```
../subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11overlay.cpp:145:37: error:
invalid conversion from 'unsigned int' to 'D2D1_DRAW_TEXT_OPTIONS' [-fpermissive]
  145 |         D2D1_DRAW_TEXT_OPTIONS_CLIP | D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     |
      |                                     unsigned int
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Nirbheek Chauhan 20d150a3b4 libpsl.wrap: Fix MSYS2 build failure
Also switch from git repo to tarball.

https://github.com/rockdaboot/libpsl/pull/211

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Nirbheek Chauhan c9f31b8100 cairo.wrap: Bump to latest to fix MSYS2 build failure
```
../subprojects/cairo/src/win32/cairo-dwrite-font.cpp:722:50: error: 'MCW_PC' was not declared in this scope
  722 |         _controlfp_s(&control_word, _CW_DEFAULT, MCW_PC);
      |                                                  ^~~~~~
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Nirbheek Chauhan c6d27a3ca7 fribidi.wrap: Move to tarball, bump, provide dep
Wrap needs to provide the dep now after the pango bump.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Nirbheek Chauhan 5d30524c29 pango.wrap: Bump to 1.50.14, remove merged patch
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Nirbheek Chauhan 9c882287d5 fontconfig.wrap: Bump and fix MSYS2 build failure
Apply upstream patch:
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/283

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Nirbheek Chauhan 20eef720f0 harfbuzz.wrap: Bump to latest to fix MSYS2 build failure
Need the following commit:

7dfa672dac

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Nirbheek Chauhan 8e1b6accbd meson: Always use forward slashes in defines with paths
Fixes the following build failure on MSYS2:

```
../subprojects/gstreamer/tests/check/elements/filesrc.c: In function 'test_seeking':
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: error: incomplete universal character name \U
  107 |   g_object_set (G_OBJECT (src), "location", TESTFILE, NULL);
      |                                                     ^
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\A'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\g'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\s'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\g'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\c'
```

Due to: `-DTESTFILE=\"C:\\Users\\Administrator\[...]`

https://gitlab.freedesktop.org/nirbheek/gstreamer/-/jobs/45317733

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Víctor Manuel Jáquez Leal 180465c005 vaapidecode,vaapipostproc: Disable DMAbuf from caps negotiation
Given the amount of complains about artifacts when negotiating dmabuf
given incompatible drm-formats, and that there's no enough bandwidth
for a proper and quick fix in gstreamer-vaapi, this patch disables,
from decoders and postprocessor, the DMABuf caps feature.

For those who needs DMABuf can use the va elements in -bad, increasing
their ranking for autoplugging by using the environment variable
GST_PLUGIN_FEATURE_RANK=vah264dec:MAX, for example.

This can be considered a first step to the deprecation of
gstreamer-vaapi in favor of the va plugin in -bad.

Fixes: #1137
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5010>
2023-07-12 19:30:36 +00:00
Philippe Normand 4dc503e1e4 decodebin3: Remove spurious input locking during parsebin reconfiguration
Commit 22917b140f added extra locks in
`reset_input_parsebin()` but all call sites of that function already take the
input lock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5022>
2023-07-12 18:33:00 +00:00
Michael Tretter 5de27e0620 v4l2videoenc: always allocate CAPTURE buffer from our pool
The videoencoder base class always uses the negotiated allocator for allocating
coded buffers and ignores the negotiated buffer pool. Therefore, the
v4l2videoenc always has to copy buffers from the pool into the allocated
output buffers.

This breaks downstream elements that want to import the CAPTURE buffers of the
v4l2videoenc, since the v4l2videoenc copies the exported CAPTURE buffers and
sends the copies downstream.

Always use the CAPTURE buffer pool for acquiring CAPTURE buffers instead of
allocating the buffers in the base class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4230>
2023-07-12 16:15:06 +00:00
Alicia Boya García 9ca194d8cc harness: Fix race condition when torn down during the handling of a non-serialized query or event
It's possible and normal to tear down a harness while the pipeline is
running. At the same time, it's desired for the
`gst_harness_pad_link_tear_down()` function to be synchronous.

This has created the conflict where the main thread may request a
harness to be torn down while it's in use or about to be used by a pad
in the streaming thread.

The previous implementation of `gst_harness_pad_link_tear_down()` tried
to handle this by taking the stream lock of the harnessed pad and
resetting all the pad functions while holding it. That approach was
however insufficient to handle the case where a non-serialized event
or query is being handled or about to be handled in a different thread.

This edge case was one race condition behind the flakes in the flvmux
check tests -- the rest being covered by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2803.

This patch fixes the problem by adding an intermediate ref-counted
object, GstHarnessLink, which replaces the usage of the HARNESS_KEY
association. GstHarnessLink allows the pad functions such as event,
query and chain to borrow a reference to GstHarness and more
importantly, to lock the GstHarnessLink during their usage to block
(delay) its destruction until no users are left, and guarantee that any
future user will not receive an invalid GstHarness handle past its
destruction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5017>
2023-07-12 13:18:00 +00:00
Carlos Rafael Giani da3b51c0c4 gl: Take into account viv-fb vs. viv_fb naming in meson scripts
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5020>
2023-07-12 21:35:57 +10:00
Matthew Waters a2d9584b27 gl: provide a pkg-config/gir file for the viv-fb backend
Required to be able to generate coherent bindings for window system
specific APIs due to limitations in gobject-introspection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5020>
2023-07-12 21:35:55 +10:00
Matthew Waters ffb2e87fd4 gl: don't install the viv-fb window header file
It is not needed at all by any external implementations and should not
be exposed to the outside world.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5020>
2023-07-12 21:31:45 +10:00
Nicolas Dufresne 60afc6cc95 python: Fix variable name for gst_element_factory_make
In order to use keyword argument, the names shoudl match the documentation. Both
arguments name was changed in the override.

Fixes: #2779
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4982>
2023-07-11 14:39:30 +00:00
Seungha Yang 31c1cf0150 qt6d3d11: Set sampler filtering method
QQuickItem::smooth property doesn't seem to be propagated to
newly created QSGSimpleTextureNode automatically.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2793
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5004>
2023-07-11 12:14:17 +00:00
Seungha Yang 521ba8f65a qt6: Set sampler filtering method
QQuickItem::smooth property doesn't seem to be propagated to
newly created QSGSimpleTextureNode automatically.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2793
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5004>
2023-07-11 12:14:17 +00:00