Commit graph

114185 commits

Author SHA1 Message Date
Seungha Yang 230ecf3cd9 d3d11memory: Remove GstD3D11PoolAllocator::dispose
Clear GstD3D11Device object in finalize method as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3726>
2023-01-13 19:33:56 +00:00
Rodrigo Bernardes fe90b08d2f dvbbasebin: don't rely on g_key_file_get_(integer|uint64) return
instead check if an error was returned, and fail if any

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3701>
2023-01-10 01:55:35 +00:00
Olivier Crête 2544c7cb78 webrtc examples: Force regular non-MULTIOPUS
Using MULTIOPUS breaks with most browsers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3685>
2023-01-05 10:18:40 +00:00
Olivier Crête 45b4bca877 webrtc-unidirectional: Avoid critical
Don't unref the parameter passed to a signal, it's always owned by
the caller. Fixes a GLib critical.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3685>
2023-01-04 20:05:29 +00:00
Sebastian Dröge 965e6086d0 ges: gst_bin_add() is transfer floating so wrappers around it are too
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3684>
2023-01-04 18:50:01 +00:00
Mathieu Duponchelle 903289613b qtmux: For video with N/1001 framerates use N as timescale instead of centiframes
This is recommended by various specifications for such framerates, while
for integer framerates we continue using centiframes to allow for some
more accuracy.

Using N means that no rounding error accumulates, eventually leading to
outputting a packet with a different duration.

Some tools such as MediaInfo determine that a stream is variable
framerate if any packet has a different duration than the others, and
there is no reason I can see for not using the full 4 bytes of
resolution that the mp4 timescale offers.

Example problematic pipeline:

```
videotestsrc num-buffers=5001 ! video/x-raw,framerate=60000/1001,width=320,height=240 ! \
videoconvert ! x264enc bitrate=80000 speed-preset=1 tune=zerolatency ! h264parse ! \
video/x-h264,profile=high-10 ! mp4mux ! filesink location="result2.mp4"
```

This results in a media file that MediaInfo detects as variable
framerate because the 5000th packet has duration 99 instead of 100.

With this patch, the timescale is 60000 and all packets have duration
1001.

Related issue for context: https://bugzilla.gnome.org/show_bug.cgi?id=769041

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3683>
2023-01-04 18:01:50 +00:00
Sebastian Dröge 49dccf42b6 avvidenc: Set timebase in the ffmpeg context to nanoseconds and set framerate
As we now actually use the timestamps from ffmpeg for timestamping the
output we would lose a lot of accuracy if the framerate is used.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3679>
2023-01-04 17:19:37 +00:00
Olivier Crête 7cb4f36c42 srt: Avoid crash on unknown option
Use the correct field that is null instead of the struct value which
never is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3682>
2023-01-04 15:23:15 +00:00
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