Commit graph

120472 commits

Author SHA1 Message Date
Matthew Waters
be1841904b tests/examples/qmloverlay.py: add license and copyright headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Matthew Waters
493b657ff8 tests/examples/qml-multisink: add license and copyright headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Matthew Waters
73624fa5c9 tests/examples/qmlglsrc: add copytright and licenses headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Matthew Waters
9c99dfc34d tests/examples/qmlglsink/overlay: add copyright and licenses headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Matthew Waters
55648d9b8d tests/examples/qml6: Add license and copyright information
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7244>
2024-09-02 11:19:33 +00:00
Sebastian Dröge
55994477a7 bus: Switch from GstAtomicQueue to GstVecDeque
All accesses to it were protected either by a mutex already, or at least
used yet another mutex for gst_poll_read_control() / gst_poll_write_control().

The usage of GstPoll has to stay for backwards compatibility as it is
used to manage the (public) fd that can be used to wait for the bus to
be ready, but this switch at least simplifies the implementation a bit
and results in fewer atomic operations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6684>
2024-09-02 09:26:23 +00:00
Sebastian Dröge
8e589eec08 bufferpool: Switch from GstAtomicQueue to GstVecDeque and a mutex/cond
While the atomic queue itself is lock-free, all its usage had to be
synchronized externally via a GstPoll and gst_poll_read_control() /
gst_poll_write_control(). Both functions were always taking a mutex
internally since cd06aea1, so the implementation was just very
complicated but not lock-free at all.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6684>
2024-09-02 09:26:23 +00:00
Sebastian Dröge
3c7ddf902a structure: Remove quadratic behaviour from gst_structure_fixate()
It was iterating over each field and after fixating its value was again
iterating over every field to find where to store the value.

Instead directly overwrite the value after validating it.

Also actually check that the structure is writable before modifying its fields
by using gst_structure_map_in_place() instead of gst_structure_fixate().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7420>
2024-09-02 07:32:16 +00:00
Philippe Normand
89f335f173 webrtcbin: Prevent crash when attempting to set answer on invalid SDP
If the pending remote description has an invalid BUNDLE group _parse_bundle()
triggers early return from _create_answer_task(), before ret has been
initialized, so it needs to be checked before attempting to call
gst_sdp_message_copy().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7423>
2024-09-02 04:00:57 +00:00
Sebastian Dröge
8b0ae3ba87 clock: Fix calculation for number of bits needed to store a 64 bit value
It was using log2(n) but what actually is needed is log2(n) + 1. Also add a
fast-path that uses __builtin_clzll() on gcc/clang.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7406>
2024-08-29 10:55:35 +00:00
Sebastian Dröge
41f3fab3d4 clock: Fix unchecked overflows in linear regression code
The initial calculation for the precision shift was wrong and would allow for
overflows during the calculations which were not detected and lead to wrong
results.

Also add a test for a case where overflows where previously not detected and
caused a completely wrong result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7406>
2024-08-29 10:55:35 +00:00
Daniel Morin
4106ad4ae6 doc: correct delimiters documentation
- "<>" are delimiters for GST_TYPE_ARRAY and "{}" are delimiters for
  GST_TYPE_LIST.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7419>
2024-08-29 00:00:43 +00:00
Edward Hervey
2dd400b885 ci: Rebuild image for new hotdoc release
Includes fixes for upstream documentation changes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7416>
2024-08-28 21:17:26 +03:00
Edward Hervey
087cb87d27 bad: Add suppression for libsrt issues
This is not code we control

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7415>
2024-08-28 06:54:02 +00:00
Edward Hervey
38271fc9e4 check: Fix leak in lc3 test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7415>
2024-08-28 06:54:02 +00:00
Edward Hervey
8da2ea6fa1 gstreamer: Make dlopen leak suppression more generic
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7415>
2024-08-28 06:54:02 +00:00
Carlos Bentzen
77faf0a163 webrtcbin: fix regression with missing RTP header extensions in Answer SDP
webrtcsrc first creates recvonly transceivers with codec-preferences
and expects that after applying a remote description, the
previously created transceivers are used rather than having new
transceivers created.

When pairing webrtcsink + webrtcsrc, the offer sdp from webrtcsink has a media
section with sendonly direction. In !7156, which was implemented following
RFC9429 Section 5.10, we only reuse a unassociated transceiver when applying a
remote description if the media is sendrecv or recvonly, and that caused creation
of new transceivers when applying a remote offer in webrtcsrc, thus losing
information from codec preferences like the RTP extension headers in the
previously created transceivers.

Since the change in !7156 broke existing code from webrtcsrc, relax the condition
for reusing unassociated transceivers and add a test to document this behavior which
wasn't covered by any tests before.

Fixes #3753.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7417>
2024-08-27 23:56:00 +00:00
Francis Quiers
ac868d9dc1 voamrwbenc: fix list of bitrates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7396>
2024-08-27 13:53:04 +00:00
Edward Hervey
2385a2e68d qt6: Remove unused field
```
In file included from ../subprojects/gst-plugins-good/ext/qt6/gstqsg6material.cc:31:
../subprojects/gst-plugins-good/ext/qt6/gstqsg6material.h:69:17: error: private
field 'mem_' is not used [-Werror,-Wunused-private-field]
   69 |     GstMemory * mem_;
      |                 ^
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7414>
2024-08-27 13:38:37 +02:00
Edward Hervey
864faa34cd qt6: Rename symbols to avoid conflict in static builds
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7414>
2024-08-27 13:37:41 +02:00
Daniel Pendse
e4fbf9d180 rtmp2: Add llnw auth support to rtmp client
Add support for Limelight CDN (llnw) authentication. Inspired
by the ffmpeg implementation of llnw auth.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7410>
2024-08-26 15:02:01 +00:00
Jan Alexander Steffens (heftig)
5ca52ea026 h264parse, h265parse: Fix time code calculation
We need to multiply for the nuit_field_based_flag before scaling, or
we'll lose precision and end up only adding even timecodes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7241>
2024-08-26 14:04:13 +00:00
chitao1234
1f21d4a892 docs: fix incorrect define in android jni code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7408>
2024-08-24 23:09:22 +08:00
RSWilli
b2c4f68328 webrtc: fix documentation error in GstWebRTCKind
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7407>
2024-08-24 10:08:57 +00:00
Seungha Yang
8f9a53fa85 timecodestamper: Add running-time source mode
Add a new source mode "running-time". This mode will convert buffer
running time into timecode

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7322>
2024-08-23 18:37:16 +00:00
Edward Hervey
ea59c921d6 decodebin3: Fix collection identity check
Collections can be auto-generated from upstream and yet have exactly the same
streams in it.

Therefore do a more in-depth check for equality.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7401>
2024-08-22 09:27:02 +00:00
Thibault Saunier
87c69e5174 ci: Fail tests if we forget to checkout expectation files
And add missing expectation files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7400>
2024-08-21 17:53:38 +00:00
Jan Schmidt
3c7f9c0fab qmlglsink: Add support for external-oes textures
Support was added to qml6glsink in MR !7319

Backport similar support to the Qt5 element so it
can also support direct DMABuf import from hardware
decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7393>
2024-08-21 17:03:21 +01:00
Thibault Saunier
8fdd59f9d5 validate: flow: Allow logging upstream events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7382>
2024-08-21 13:55:15 +00:00
Edward Hervey
0fc5210c48 gitlab-ci: Try timestamps on CI logs
https://docs.gitlab.com/ee/ci/yaml/ci_job_log_timestamps.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7383>
2024-08-21 12:44:09 +00:00
Jan Schmidt
6cf3d32886 gstplayer: Check GstPlayerSignalDispatcher type
Before trying to retrieve a GMainContext from a provided
GstPlayerSignalDispatcher, check that it is actually
GstPlayerGMainContextSignalDispatcher. If not, use the
default GMainContext for dispatching signals via the adapter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7392>
2024-08-21 20:25:59 +10:00
Guillaume Desmottes
389f7e0d7b wpe: fix gst-launch example
wpesrc does not have num-buffers property but wpevideosrc does.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7389>
2024-08-21 09:13:22 +00:00
Sebastian Dröge
7daa040d24 avdemux: Never return 0 from read function
Instead return AVERROR_EOF. The read function must never ever return 0 according
to the documentation, and in practice this leads to infinite loops.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7390>
2024-08-21 11:05:11 +03:00
Seungha Yang
1b5f026119 examples: Add CUDA based in-place transform element example
Adding a CUDA example element for plugin developers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7004>
2024-08-20 23:48:24 +00:00
Seungha Yang
c484de8d8b gst-rtsp-server: Make test-onvif-client example work on Windows
Use autovideosink instead of hardcoded xvimagesink,
so that platform-default videosink can be picked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7174>
2024-08-20 19:44:42 +00:00
Mathieu Duponchelle
25f3ab2e6c audioconvert: handle new GstRequestMixMatrix custom upstream event
An example use case is the gstwebrtc-api demo, which will cause
webrtcsink to forward such events. This lets the end user define a mix
matrix without requiring any application code server side.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Mathieu Duponchelle
fd90d7bdee audioconvert: fix setting of mix matrix at run time
There were two main issues:

The mix matrix was not protected with the object lock

The code was mistakenly assuming that after updating the mix matrix
a reconfigure event sent upstream would be enough to cause upstream to
send caps again, and the converter was only reconstructed in ->set_caps.

That was not actually enough, as if the new matrix didn't affect the
number of input / output channels there was no reason for upstream to do
anything after getting the unchanged caps.

The fix for this was to have ->transform also recreate the converter
when needed, with the added subtlety that depending on the mix matrix
the element could be set to passthrough. This means that when setting
the mix matrix the converter also had to be recreated immediately to
check if the element had to be switched back to non-passthrough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Mathieu Duponchelle
015af606b6 audio-converter: support more numerical types for mix matrix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7363>
2024-08-20 17:05:49 +00:00
Paweł Kotiuk
c5e7ffcd1b example: Add example for streaming camera rith RTSP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6965>
2024-08-20 12:55:06 +00:00
Jan Schmidt
96c4bd8d9f webrtc: Fix racy unit test
Don't reuse the same stats state structure across multiple
get-stats calls. Make each callback take a copy of the
non-changing fields it needs and use a local working copy
to avoid crashing.

Fixes problems with the unit test crashing sometimes for the
unit test introduced in MR !7338

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7387>
2024-08-20 12:07:02 +00:00
Jan Schmidt
055b5af99e webrtcbin: Always populate rtp-inbound stats fields
Even if there's no jitterbuffer yet for an incoming stream,
make sure to populate the mandatory statistics with 0 entries.

Fixes problems with the unit test failing sometimes for the
unit test introduced in MR !7338

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7387>
2024-08-20 12:07:02 +00:00
Michael Scherle
671281d860 va: add interpolation method for scaling
For description of interpolation methods, see:
<https://intel.github.io/libva/structVAProcPipelineParameterBuffer.html#abb95e119ed7f841f71b2afbec2104784>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7301>
2024-08-20 08:36:03 +00:00
Víctor Manuel Jáquez Leal
d301324652 va: don't use GST_ELEMENT_WARNING in set_context() vmethod
Since bins can set the context of their children elements, the set_context()
vmethod shouldn't call bus messages post methods, since it locks the parent
object, the bin, which might be already locked, leading to a deadlock.

Fixes: #3706
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7378>
2024-08-19 14:34:28 +02:00
Jan Schmidt
97845475c5 webrtcbin: Fix uint64 -> uint confusion for ice-candidate priority
ICE candidate priority is a 32-bit field and reported as such in the
webrtcbin statistics, but the documentation was incorrect, and the
unit test was looking for a uint64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7338>
2024-08-19 21:07:52 +10:00
Jan Schmidt
7da5d03b29 webrtcbin: Fixes for bundled statistics generation
When multiple streams are bundled on the same transport,
the statistics would end up incorrectly generated,
as each pad would regenerate stats for every ssrc on the
transport, overwriting previous iterations and assigning
bogus media kind and other values to the wrong ssrc.

Fix by making sure each pad only loops and generates
statistics for the one ssrc that pad is receiving / sending.

Add a unit test that the codec kind field in RTP statistics
are now generated correctly.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2555
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7338>
2024-08-19 21:07:51 +10:00
Edward Hervey
de6de83986 urisourcebin: Actually drop EOS on old-school pad switch
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7375>
2024-08-19 09:49:12 +02:00
Seungha Yang
4bb3854772 d3d12: Add d3d12swapchainsink element
Adding a new videosink element for Windows composition API based
applications. Unlike d3d12videosink, this element will create only
DXGI swapchain by using IDXGIFactory2::CreateSwapChainForComposition()
without actual window handle, so that video scene can be composed
via Windows native composition API, such as DirectComposition.
Note that this videosink does not support GstVideoOverlay interface
because of the design.

The swapchain created by this element can be used with
* DirectComposition's IDCompositionVisual in Win32 app
* WinRT and WinUI3's UI.Composition in Win32/UWP app
* UWP and WinUI3 XAML's SwapChainPanel

See also examples in this commit which show usage of the videosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7287>
2024-08-19 11:07:17 +09:00
Nirbheek Chauhan
337fee8388 ci: Add a gtk subproject for testing on windows and macos
The gstreamer-rs CI needs to build gtk to test the gtk4 plugin in
gst-plugins-rs. Formalize support for gtk in the monorepo, and disable
it by default because it's not an important dependency; unlike
libnice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7372>
2024-08-17 16:07:34 +05:30
Nirbheek Chauhan
da00a1cabb meson: Bump gtk4 and pango wraps
Newer pango is needed to build gtk 4.14 on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7372>
2024-08-17 15:00:11 +05:30
Edward Hervey
7546975856 urisourcebin: Don't hold lock when emitting about-to-finish
This could trigger actions that re-enter this element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7368>
2024-08-17 05:50:26 +00:00