Commit graph

114127 commits

Author SHA1 Message Date
Tim-Philipp Müller
32d11fdaf4 subprojects: libffi: pin to meson-3.2.9999.4 tag
In case we want to change the 'meson' branch over
to the re-done meson port based on upstream libffi
in future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3669>
2023-01-02 00:35:56 +00:00
Sebastian Dröge
ce7bc581f1 gl: Mark gst_gl_context_new_wrapped() return value as nullable
If a GL context is requested for which no API support is compiled in
then `NULL` is returned.

Also remove a useless `NULL` check: `g_object_new()` can't possibly
return `NULL`, ever.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3668>
2023-01-02 00:05:30 +00:00
Nirbheek Chauhan
996b9ebd9e meson: Add gstreamer-gl-1.0 pkgconfig vars to internal dependency
So we can fetch gl_winsys, gl_platforms, etc directly using
gst_gl_dep.get_variable() when building gstreamer as a subproject, or
when building gst-plugins-rs's gtk4 plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3667>
2023-01-01 23:32:49 +00:00
Philippe Normand
9aa8393e06 tests: gstelement: Fix test_add_pad_while_paused flakiness
`gst_element_remove_pad()` doesn't automatically deactivate the pad, it has to
be done explicitly beforehand, otherwise the pad task might be left dangling,
exposed to undefined behaviour.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3651>
2022-12-28 19:02:42 +01:00
Alicia Boya García
ebe44034c1 gstelement: fix deadlock in gst_element_add_pad() when >=PAUSED
gst_element_add_pad() is supposed to activate the pad if the element
state is >= PAUSED and the pad is not already active.

Unfortunately, before this patch, the activation was performed while the
element lock was still taken, which ended causing a deadlock in
gst_pad_start_task() as it attempted to post `stream-status` message in
the element, which also requires the element lock.

Elements could work around this bug by activating the pad manually
before adding it to the element.

This patch fixes the problem by performing pad activation only after the
element lock has been released.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3651>
2022-12-28 13:16:33 +01:00
Seungha Yang
e2f30cd947 gtkbasesink: Fix widget leak
gst_gtk_base_sink_get_widget() will increase refcount and it should
be released after use

Fixing regression introduced by the commit
941c0e81dd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3650>
2022-12-28 11:46:14 +01:00
Yatin Maan
7cf130801b aom: av1enc: Ensure that input pts is strictly increasing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3649>
2022-12-27 22:42:56 +01:00
Yatin Maan
ab7b1c8d62 aom: av1enc: Fix pts unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3649>
2022-12-27 22:42:49 +01:00
Seungha Yang
d5086a1091 rtspsrc: Fix string leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3648>
2022-12-27 21:43:02 +01:00
Seungha Yang
620974352d rtptimerqueue: Fix memory leak
Should chain up to parent's finalize

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3648>
2022-12-27 21:43:02 +01:00
Tim-Philipp Müller
8bee905f95 ci: validate: don't --check-bugs in 1.20 branch
Any issues fixed may only have been fixed in the main branch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3647>
2022-12-27 21:06:08 +01:00
Sebastian Dröge
ccd582c332 bin: Fix race conditions in tests
The latency messages are non-deterministic and can arrive before/after
async-done or during state-changes as they are posted by e.g. sinks from
their streaming thread but bins are finishing asynchronous state changes
from a secondary helper thread.

To solve this, expect latency messages at any time and assert that we
receive one at some point during the test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3647>
2022-12-27 20:38:37 +01:00
He Junyan
78d1f5d026 va: Delay the VAProcPipelineCaps query after context created.
The VAAPI vaQueryVideoProcPipelineCaps() requires the context as the
parameter. So far, we always pass VA_INVALID_ID and it can succeed.
But the API does not say that and in theory, a valid context is required.
Now the new platform really needs a valid context and so we have to
delay that query until the context is created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3620>
2022-12-22 02:29:46 +00:00
Matthias Fuchs
10fee807b9 qmlglsrc: Fix deadlock when stopping
This fix makes sure that streaming thread stops waiting when the
qmlglsrc element transitions from playing to paused.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3619>
2022-12-22 01:57:36 +00:00
Tim-Philipp Müller
4a99827d4c Back to development 2022-12-20 00:39:36 +00:00
Tim-Philipp Müller
f7806a854a Release 1.20.5 2022-12-19 23:34:46 +00:00
Tim-Philipp Müller
554efedd44 Update ChangeLogs for 1.20.5 2022-12-19 23:34:34 +00:00
Philipp Zabel
18cae8c9b4 videoscale: fix valid_tags NULL-terminated array of strings
The valid_tags array of strings must be NULL-terminated,
as it is passed to the g_strv_contains() function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3604>
2022-12-19 14:37:16 +00:00
Edward Hervey
f9c2df6f9a mpegts: Always clear packetizer on DISCONT push mode
If a discontinuity is detected in push mode, we need to clear the cached section
observations since they might have potentially changed.

This was only done properly when operating with TIME segments (dvb, udp,
adaptive demuxers, ...) but not with BYTE segments (such as with custom app/fd
sources).

We still don't want to flush out the PCR observations, since this might be
needed for seeking in push-based BYTE sources.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3600>
2022-12-19 10:16:43 +00:00
Edward Hervey
551580482d decodebin2: Minor debug fix for decodepad
decodedad might have their name changed when exposing, causing a race when
trying to get their name without taking a lock. Just use GST_PTR_POINTER in
debug statements instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:19 +00:00
Edward Hervey
ec2f30c4db imagesequencesrc: Don't leak caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:19 +00:00
Edward Hervey
e7505ed8b1 ges-launcher: Don't leak string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:18 +00:00
Edward Hervey
7729f144d7 ges-demux: Don't leak string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:18 +00:00
Edward Hervey
df414c2105 ges-xml-formatter: Plug some leaks
* Don't leak the mainloop
* Don't leak temporary strings
* Don't leak id when searching in hash table

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:18 +00:00
Edward Hervey
cc1a2bd836 ges-project: Don't leak string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:18 +00:00
Edward Hervey
4704df2c26 ges-structure-parser: Don't leak failed strings
We pass the ownership of current_string to the list of wrong strings, it will be
cleared then.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:18 +00:00
Edward Hervey
d5898c0435 ges-launch: Don't leak help string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3597>
2022-12-18 19:14:18 +00:00
Nirbheek Chauhan
66ef101cf5 rtspsrc: Fix regression when using hostname in the location property
When the address can't be parsed as an IP address, it should just be
treated as a hostname and used as-is.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3596>
2022-12-18 18:16:16 +00:00
Nirbheek Chauhan
0b2db215e9 rtspsrc: Fix usage of IPv6 connections in SETUP
If the SETUP request returns an IPv6 server address in the Transport
field, we would generate an incorrect URI, and multiudpsink would fail
to initialize:

```
     rtspsrc gstrtspsrc.c:9780:dump_key_value:<source>    key: 'Transport', value: 'RTP/AVP;unicast;source=fe80::dc27:25ff:fe5e:bd13:8080;client_port=62696-62697;server_port=4000-4001'
...
     rtspsrc gstrtspsrc.c:4595:gst_rtspsrc_stream_configure_udp_sinks:<source> configure RTP UDP sink for fe80::dc27:25ff:fe5e:bd13:8080:4000
...
multiudpsink gstmultiudpsink.c:1229:gst_multiudpsink_configure_client:<udpsink0> error: Invalid address family (got 23)
```

We can't look at stream->is_ipv6 because we can't rely on the server
returning the right value there. In the issue reported about this,
server reported itself as `KuP RTSP Server/0.1`, and the SDP was:

```
c=IN IP4
m=video 54608 RTP/AVP 96
a=rtpmap:96 H264/90000
```

So we need to parse the string value and figure out the family
ourselves.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3596>
2022-12-18 18:15:26 +00:00
Nicolas Dufresne
d9ebd9203c v4l2videodec: Fix activation of internal pool
If the driver does not support VIDIOC_CREATE_BUFS ioctl, the pool
configuration may get changed, which requires a validation. This would
fail to activate a pool in a case it shouldn't normally fail unless we
are out of memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2677>
2022-12-18 13:33:27 +00:00
Seungha Yang
3f3604f4e2 d3d11videosink: Fixing focus lost on desktop layout change
Watch all message on the window thread, instead of internal window only.
Otherwise, some global window messages, such as desktop layout change,
wouldn't be handled by our window.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3594>
2022-12-17 13:26:23 +00:00
Nirbheek Chauhan
5eecf867bf macos-bison-binary: Remove warning when running on arm64
The x86_64 bison works fine out of the box.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3591>
2022-12-17 01:28:00 +00:00
Nirbheek Chauhan
3cb73e02aa avfvideosrc: Report latency when doing screen capture
There is no `device` when doing screen capture, but there is always an
`input`, so use that to decide when we can reply to a latency query.
Without this, the latency query just fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3591>
2022-12-17 01:28:00 +00:00
Seungha Yang
79672414cc d3d11videosink: Call ShowWindow() from window thread
... when rendering on external HWND. ShowWindow() will cause
synchronous message passing to window thread and then can be blocked.
At the same time, window thread can wait for GStreamer thread.
Instead of the synchronous call, queue the task to window message
and performs from the window thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3588>
2022-12-16 19:06:39 +00:00
Seungha Yang
095ee27bb5 d3d11videosink: Fix deadlock when parent window is busy
Deadlock sequence:
* From a streaming thread, d3d11videosink sends synchronous message
  to the parent window, so that internal (child) window can be
  constructed on the parent window's thread
* App thread (parent window thread) is waiting for pipeline's
  state change (to GST_STATE_NULL) but streaming thread is
  blocked and waiting for app thread

To avoid the deadlock, GstD3D11WindowWin32 should send message
to the parent window asynchronously.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
2022-12-16 14:26:08 +00:00
Seungha Yang
7a7de1aafc d3d11videosink: Error out if RTV is unavailable
Add RTV pointer validation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
2022-12-16 14:26:08 +00:00
Seungha Yang
a0526b4ac2 d3d11videosink: Protect window with lock at every place
Access to the object should be thread safe to support runtime
property update

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
2022-12-16 14:26:08 +00:00
A. Wilcox
9be676306d tests: Cast drop-messages-interval type properly
The rtpjitterbuffer test drop_messages_interval uses a GstClockTime for
the message drop interval.  This property is defined as a guint.  On
systems with 64-bit time_t but 32-bit uint, this can cause the
g_object_set function to fail to read the arguments properly.

Fixes: #1656
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3582>
2022-12-16 09:36:58 +00:00
Edward Hervey
595d2d283d oggdemux: Don't leak pending seek event
Make sure any pending seek event is released when going back down to READY.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3578>
2022-12-15 23:15:58 +00:00
Edward Hervey
0000476b5a parsebin: Don't leak parsepad list on shutdown
Free it as it is down in other cases

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3578>
2022-12-15 23:15:58 +00:00
Edward Hervey
d729dbb717 oss4: Fix debug category initialization
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1456

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3577>
2022-12-15 21:08:48 +00:00
Vivia Nikolaidou
989e8307b5 opusdec: Use proper guint/guint8 type conversion
Do not cast, that might yield wrong results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3576>
2022-12-15 20:31:17 +00:00
Vivia Nikolaidou
3e68bd0a11 opusdec: Negotiate default to 2 channels
In that place, dec->n_channels can still theoretically be 0. Default to
2 in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3576>
2022-12-15 20:31:17 +00:00
Bo Elmgreen
b07f383ba6 qt: deactivate context if fill_info fails
Now the OpenGL context is deactivated if call to gst_gl_context_fill_info()
fails in gst_qt_get_gl_wrapcontext(), preventing that the context is left
activated, which could lead to invalid memory reads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3575>
2022-12-15 19:49:14 +00:00
Sebastian Dröge
94a0d579d7 systemclock: Use futex_time64 syscall if available (32-bit systems) and use correct struct timespec definition
See also https://gitlab.gnome.org/GNOME/glib/-/issues/2634

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3572>
2022-12-15 13:16:03 +00:00
A. Wilcox
551dd7df38 mpegts: Handle when iconv doesn't support ISO 6937
Systems like musl libc don't support ISO 6937 in iconv.  This ensures
that the MPEG-TS plugin can cope with that.  There is existing support
in the plugin for other methods, so it seems to have been the original
intent anyway.

Fixes: #1314
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3563>
2022-12-12 13:55:18 +00:00
Tim-Philipp Müller
19566c3a06 timeoverlay: fix pad leak
Spotted by Jiri Uncovsky.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3559>
2022-12-11 17:46:13 +00:00
Tim-Philipp Müller
448cb1c2c3 vaapi: prefix USE_FOO defines to fix build with mesa 22.3.0
Apparently mesa 22.3.0 has updated the egl headers, and eglplatform.h now
contains commit
3670d645f4
after which xlib headers don't get included by default anymore but are
dependent upon whether USE_X11 was defined.

This breaks headless builds of gstreamer-vaapi because we always define
an internal define USE_X11 as either 1 or 0.

Change these defines to GST_VAAPI_USE_XYZ instead to avoid this.

Fixes #1634

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3558>
2022-12-11 11:13:17 +00:00
Edward Hervey
5b4653756e mpegts: Check continuity counter on section streams
This wasn't really done, and is needed in order to detect potential section
changes for sections that have got identical information (such as when switching
between streams that have the same PAT/PMT pid and subtable information).

Other checks exist in tsbase to detect if the "new" PAT/PMT really is an update or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3556>
2022-12-11 00:37:18 +00:00
Xavier Claessens
68079f03f9 hotdoc: gst-hotdoc-plugins-scanner is not needed for libraries
Meson >= 0.64.0 does not allow any more to add executables into
hotdoc.generate_doc(..., dependencies: ...) and it should not be needed
any way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3554>
2022-12-10 13:49:06 +00:00