Commit graph

1366 commits

Author SHA1 Message Date
Nicolas Dufresne
dccddf203f qmlgl6src: Use downstream pool when available
This make use of the pool that has been negotiated with downstream in the
decide_allocation function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7904>
2024-11-20 19:30:39 +00:00
Marek Olejnik
6f0304fc72 navigationtest: Fix plugin description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7922>
2024-11-19 17:24:51 +00:00
Qian Hu (胡骞)
1d45fbc56b v4l2object: pass buffer align info for upstream
if downstream v4l2 output has large alignment requirement
this patch will pass align info for upstream element
and decide allocation will use these info to meet alignment
requirement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7201>
2024-11-19 15:27:38 +00:00
Matthew Waters
1814d7ae11 rtph26xpay: silence some maybe-unitialized warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:58 +11:00
Matthew Waters
3743f69c85 souphttpsrc: silence some maybe-uninitialized warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Matthew Waters
d98c83b297 v4l2videodec: silennce some maybe-uninitialized warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7875>
2024-11-18 12:10:57 +11:00
Albert Sjolund
72edd65710 rtpmanager: don't map READWRITE in twcc header ext
There is no need to map the buffer as writable, as there is
only a read performed on the mapped buffer. This is in line
with other header extensions, as no other extensions maps
it as readwrite.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7895>
2024-11-17 10:00:12 +00:00
Thibault Saunier
7010efc8ed meson: Bump minimum version to 1.3
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4025

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7899>
2024-11-16 03:02:27 +00:00
Sebastian Dröge
2bbf095e5b matroskamux: Simplify timestamp comparison logic in find_best_pad()
If a buffer has no timestamp it is immediately muxed so we can directly break
the loop and simplify comparisons in the other cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7872>
2024-11-15 22:33:53 +00:00
Sebastian Dröge
a391728ad4 matroskamux: Don't time out in live mode if no timestamped next buffer is available
The muxer can only advance the time if it has a timestamped buffer that can be
output, otherwise it will just busy-wait and use up a lot of CPU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7872>
2024-11-15 22:33:53 +00:00
Philippe Normand
701f563996 matroskamux: Delay stream-header until all sink pads have caps
If we don't wait, an incomplete header might be generated due to a race between
the _aggregate thread and the sink pad setcaps.

Fixes #3929

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7872>
2024-11-15 22:33:53 +00:00
Marianna Smidth Buschle
2766e4816a v4l2object: Fixed framerate negotiation
We had a problem with negotiation of the framerate.

Gstreamer was querying the FRAMEINTERVALS based on the max frame size
instead of the desired frame size.

This was resulting in non-negotiated errors when trying to run with a
smaller frame size and fps higher than the max for the max image size.

Fx the max framerate for 1024x1024 RGB on CMOSIS4000 is 28.292
While for 1024x100 RGB it is 280.867

But Gstreamer would allow any framerates bigger than 28.292 no matter
the frame size used...

I have fixed it by 1st changing the CAPS query to use the minimum frame
size instead of maximum.
This however has the downside of allowing gstreamer to negotiate
framerates that are too high if the image size is bigger than the
minimum.
This is not a huge problem since our driver just CLAMPS the fps value to
the max then.

However gstreamer was not being properly notified of this change, and
would therefore report a wrong fps in the CAPS structure.
Note that the fps would be correct inside the buffer info.
Since gstreamer was reading the fps back after setting it.
It was just not being "propagated" to the CAPS structure.
I have also added a WARNING to this point so we can see if the fps that
gstreamer tries to apply was accepted or not.

And the next part of the fix was to add a framerate check after the
frame size has been established.
I did this inside the fixate_caps function of the v4l2src, which was
calling the TRY_FMT in order to check if the format was correct.
So I just added a check for the ENUM_FRAMEINTERVALS in there.

And now we get the non-negotiated again if the fps is too high for the
selected frame size.
Also added a couple of warnings so it is easy to see that this was the
cause.

See:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3037

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7850>
2024-11-15 22:29:56 +00:00
Jan Alexander Steffens (heftig)
65e071c1c8 flvmux: Mux timestampless buffers immediately
Instead of leaving them queued indefinitely, or until we're timing out
and it's the only buffer queued.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7871>
2024-11-15 15:58:07 +00:00
Sebastian Dröge
969b51acb6 flvmux: Don't time out in live mode if no timestamped next buffer is available
But also don't wait for a buffer on both pads, which might take forever in case
of gaps in one of the streams.

The muxer can only advance the time if it has a timestamped buffer that can be
output, otherwise it will just busy-wait and use up a lot of CPU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7871>
2024-11-15 15:58:07 +00:00
Robert Rosengren
ff14e1a9e3 udpsrc: protect cancellable from unlock/unlock_stop race
Protect cancellable from simultaneous unlock and unlock_stop calls from
basesrc class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7885>
2024-11-15 10:33:44 +00:00
Dean Zhang (张安迪)
a7f35d4f3c qtdemux: Add support for m1v fourcc when subtype is vide
Some special videos with mlv fourcc can't be recognized by
qtdemux when the subtype of the video is vide instead of
m1v, and will cause negotiation error in subsequent plugin.
So make the handle in qtdemux_video_caps. It might be better
than nothing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7855>
2024-11-11 12:04:04 +00:00
Stefan Riedmüller
39b2dd1dd1 v4l2object: Remove little endian marker on 8 bit bayer format names
There is no point in having an endian marker on 8 bit bayer format names since
it is just one byte. Thus remove it.

This also fixes an incompatibility with plugins bad where there is no endian
marker on 8 bit bayer format names as well.

Fixes: #3729
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7826>
2024-11-06 12:06:28 +00:00
Jonas K Danielsson
20e3454c26 udpsrc: Disable allocated port reuse for unicast
The `reuse` property end up setting the SO_REUSEADDR socket option for
the UDP socket. This setting have surprising effects.

On Linux systems the man page (`socket(7)`) states:
```
SO_REUSEADDR
    Indicates that the rules used in validating addresses supplied
    in a bind(2) call should allow reuse of local addresses. For
    AF_INET sockets this means that a socket may bind, except when
    there is an active listening socket bound to the address.
```

But since UDP does not listen this ends up meaning that when an
ephemeral port is allocated (setting the `port` to `0`) the kernel is
free to reuse any other UDP port that has `SO_REUSEADDR` set.

Tests checking the likelyhood of port conflict when using multiple
`udpsrc` shows port conflicts starting to occur after ~100-300 udpsrc
with port allocation enabled. See issue #3411 for more details.

Changing the default value of a property is not a small thing we risk
breaking application that rely on the current default value. But since
the effects of having `reuse` default `TRUE` on can also have damaging
and hard-to-debug consequences, it might be worth to consider.

Having `SO_REUSEADDR` enabled for multicast, might have some use cases
but for unicast, with dynamic port allocation, it does not make sense.

When not using an multicast address we will disable port reuse if the
`port` property is set to 0 (=allocate) and warn the user that we did
so.

Closes #3411

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7841>
2024-11-06 10:21:14 +00:00
Philippe Normand
1e2d488e97 rtpfunnel: Ensure segment events are forwarded after flushs
gst_rtp_funnel_forward_segment() returns early when the current_pad is set.
Without clearing current_pad a critical warning would be emitted when
attempting to chain a buffer following a flush.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7830>
2024-11-05 14:31:03 +00:00
L. E. Segovia
ce35c07639 mpg123audiodec: Fix dependence on off_t breaking Meson wrap-based builds
Using the mpg123_*_64 functions requires API level 48 i.e. mpg123 >= 1.32.
The mpg123_*64 functions are available before then, but still depend on
off_t (and as such introduce the bug in builds against distro provided
mpg123).

See https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1568#note_2624024

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7732>
2024-11-04 21:57:25 +00:00
Tim-Philipp Müller
95eca6d919 meson: bail out earlier in docs subdir if docs are disabled
The gst_dep.get_variable('libexecdir') may fail in some scenarios
(e.g. building a module alone inside an uninstalled devenv) and
it shouldn't really be reached in the first place if docs are
disabled via options.

Also to avoid confusing meson messages when cross-compiling or
doing a static build.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7818>
2024-11-04 19:14:10 +00:00
Tim-Philipp Müller
e931a004ee gst-plugins-good: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7819>
2024-11-03 17:45:29 +00:00
Sebastian Dröge
2cc32434ad rtph264depay, rtph265depay: various parameter-set string handling fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7804>
2024-11-01 15:44:20 +00:00
Andreas Wittmann
41ad50fb48 qmlgloverlay: make depth buffer optional
allow dropping depth/stencil buffer for
qmlgloverlay element. Shows considerable
drop in memory bandwidth consumption of
the element on windows platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7677>
2024-11-01 02:37:57 +00:00
Sebastian Dröge
4ea16ff146 flvmux: Consider timestamps before segment start to map to segment start
Instead of mapping them to running time 0, which is wrong if e.g. the segment
base is not equal to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7780>
2024-10-31 18:08:05 +00:00
Sebastian Dröge
356aca593d flvmux: Use first running time on the initial header instead of 0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7780>
2024-10-31 18:08:05 +00:00
Tim-Philipp Müller
bf00524c41 rtppassthrough: fix rtp-stats message compatibility with GstRTPBasePayload
"clock-rate" and "pt" are G_TYPE_UINT in the base class, so let's
keep them like that here too, since the entire purposes of the
passthrough element is to fake being a payloader. The types in the
message don't have to be consistent with the types in the caps.

Reverts part of commit a6fa53b7 of !7526

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7552#note_2576653

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7783>
2024-10-31 03:03:56 +00:00
Johan Sternerup
c830f87a32 twcc: Handle wrapping of reference time
Previously the wrapping of the 24-bit reference time was not handled
correctly when transforming it into GstClockTime. Given the unit of 64ms
the span that could be represented by 24 bits is 12 days and depending
on the start value we could get a wrapping problem anytime within this
time frame. This turned out to be particularly problematic for the GCC
algorithm in gst-plugins-rs which tried to evict old packages based on
the "oldest" timestamp, which due to wrapping problems could be in the
future. Thus, the container managing the packets could grow without
limits for a long time thereby creating both CPU and memory problems.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7527>
2024-10-30 12:35:48 +00:00
Ognyan Tonchev
03b6226772 rtpmanager: skip RTPSources which are not ready in the RTCP generation
If a stream has an 'irregular' frame rate (e.g. metadata) RTCP SR
may be generated way too early, before the RTPSource has received
the first packet after Latency was configured in the pipeline.
We skip such RTPSources in the RTCP generation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7740>
2024-10-29 02:10:47 +00:00
Guillermo E. Martinez
1c58b34345 udp: Update documentation for `timeout' property
This patch is meant to update the time units description of `timeout' property
for the `udpsrc` element from milliseconds to nanoseconds according to the
implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7748>
2024-10-26 08:48:23 +00:00
Edward Hervey
cb87d7b129 plugins_cache: Update for fedora 40 build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7455>
2024-10-25 13:55:19 +00:00
Carlos Falgueras García
561ca94916 video: Add GRAY10_LE16 support
This adds a 10-bit variant of grayscale packed into 16 bits little-endian
words. The MSB 6 bits are padding and should be ignored. This format is
used by Fraunhofer VVC encoder and decoder libraries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7706>
2024-10-25 05:53:22 +00:00
François Laignel
0f7be28eb1 rtspsrc: client-managed MIKEY KeyMgmt
Some servers (e.g. Axis cameras) expect the client to propose the encryption
key(s) to be used for SRTP / SRTCP. This is required to allow re-keying so
as to evade cryptanalysis. Note that the behaviour is not specified by the
RFCs. By setting the 'client-managed-mikey-mode' property to 'true', rtspsrc
acts as follows:

* For a secured profile (RTP/SAVP or RTP/SAVPF), any media in the SDP
  returned by the server for which a MIKEY key management applies is
  elligible for client managed mode. The MIKEY from the server is then
  ignored.
* rtspsrc sends a SETUP with a MIKEY payload proposed by the user. The
  payload is formed by calling the 'request-rtp-key' signal for each
  elligible stream. During initialisation, 'request-rtcp-key' is also
  called as usual. The keys returned by both signals should be the same
  for a single stream, but the mechanism allows a different approach.
* The user can start re-keying of a stream by calling SET_PARAMETER.
  The convenience signal 'set-mikey-parameter' can be used to build a
  'KeyMgmt' parameter with a MIKEY payload.
* After the server accepts the new parameter, the user can call
  'remove-key' and prepare for the new key(s) to be served by signals
  'request-rtp-key' & 'request-rtcp-key'.
* The signals 'soft-limit' & 'hard-limit' are called when a key
  reaches the limits of its utilisation.

This commit adds support for:

* client-managed MIKEY mode to srtpsrc.
* Master Key Index (MKI) parsing and encoding to GstMIKEYMessage.
* re-keying using the signals 'set-mikey-parameter' & 'remove-key' and
  then by serving the new key via 'request-rtp-key' & 'request-rtcp-key'.
* 'soft-limit' & 'hard-limit' signals, similar to those provided by srtpdec.

See also:

* https://www.rfc-editor.org/rfc/rfc3830
* https://www.rfc-editor.org/rfc/rfc4567

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7587>
2024-10-24 12:43:11 +00:00
Nirbheek Chauhan
7c3ee65d60 soup: Re-enable libsoup dlopen on macOS
Move from GModule to libdl for loading libraries on all platforms.
This is necessary due to a macOS bug where dyld uses the incorrect
@loader_path value for RPATH entries, and fails to find libsoup.

More details here: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1171#note_2290789

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7635>
2024-10-21 13:01:46 +00:00
Marek Vasut
c1adfb2e1a qt: Added support for RGB16/BGR16 input format to qmlglsink
This allows input format to be 16-bit RGB565/BGR565, which is
generated by various V4L2 devices. This format can be useful
on hardware which is constrained by memory bandwidth.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7567>
2024-10-19 09:15:55 +00:00
Sebastian Dröge
38392f6049 imagefreeze: Add support for JPEG / PNG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7660>
2024-10-18 06:53:04 +00:00
Andoni Morales Alastruey
15c990a8d8 qtdemux: fix parsing of matrix with 180 rotation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7607>
2024-10-14 16:54:38 +00:00
Nirbheek Chauhan
3fadf4807c lame: Disable tools when using the fallback subproject
This saves time when building, since we don't use the tools.

Particularly on macOS, due to a macOS bug, Meson picks up an invalid
ncurses-config binary and incorrectly detects the presence of ncurses,
causing a build failure. This is fixed in the latest meson:
https://github.com/mesonbuild/meson/pull/13715

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7611>
2024-10-11 21:20:59 +00:00
Jan Schmidt
885f16b3ac rtpsession: Fix a typo in docstring comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7424>
2024-10-11 05:20:22 +00:00
Jan Schmidt
ef8dfd7873 rtpmanager: save the report block statistics in each RTPSource
Move RB info from receiver reports into the internal source that the RR
are about, and deprecate (but retain) the old mapping where each
external source has only a single RB entry in the rtp statistics.

The old method is broken if a remote peer uses a single ssrc to send
receiver reports for more than one of our internal sources, other
as multiple RB in a single packet, or alternate RB in different reports.
In each case only the most recent entry was kept, overwriting data for
other internal sources.

In multicast scenarios each internal source may receive multiple
receiver reports from different peers. To support that, all received
RR's are now stored into a hash table indexed by the sender's SSRC,
and all RRs are placed into an array when generating statistics, so
that the information from all peers is retrievable.

The current deficient behaviour (adding RB info into non-internal RTPSources) is
deprecated but kept in order to be backward compatible, and retained
that way in the generated statistics structure.

Refs
[1] https://tools.ietf.org/html/rfc3550#section-6.4.1

Based on a patch by Fede Claramonte <fclaramonte@twilio.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7424>
2024-10-11 05:20:22 +00:00
valadaptive
b923a3ed61 qtdemux: Add support for Lagarith fourcc tag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6831>
2024-10-10 03:55:04 +00:00
Sebastian Dröge
12b434ae9d matroskamux: Add support for latency timeouts in live pipelines
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7510>
2024-10-01 13:20:18 +00:00
Sebastian Dröge
945a7bdfc4 matroskamux: Port to GstAggregator
Co-authored-by: Tim-Philipp Müller <tim@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7510>
2024-10-01 13:20:18 +00:00
Sebastian Dröge
bbd3d6f4f6 qtdemux: Check fourcc of a second CEA608 atom instead of assuming it's cdt2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7575>
2024-09-29 06:18:56 +00:00
Sebastian Dröge
b7b24573ce common: Use more efficient versions of GstCapsFeatures API where possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:26:18 +03:00
Sebastian Dröge
6233eb0ff3 common: Stop using GQuark-based GstStructure field name API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Sebastian Dröge
0c1611d31d common: Stop using GQuark-based GstStructure name API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432>
2024-09-26 19:21:29 +03:00
Sebastian Dröge
d4bab55077 qtdemux: Skip zero-sized boxes instead of stopping to look at further boxes
A zero-sized box is not really a problem and can be skipped to look at any
possibly following ones.

BMD ATEM devices specifically write a zero-sized bmdc box in the sample
description, followed by the avcC box in case of h264. Previously the avcC box
would simply not be read at all and the file would be unplayable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7564>
2024-09-24 11:21:19 +03:00
Nicolas Dufresne
66f1c9fd13 doc: good: Update documentation cache
video4linux2 plugin now maps RGB15 which his didn't before.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 16:50:43 -04:00
Nicolas Dufresne
09e23e325c v4l2object: Fix a gvalue leak on error
In case we failed enumerating the supported interlacing mode, we leaked the
gvalue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7540>
2024-09-23 19:58:52 +00:00