Commit graph

8521 commits

Author SHA1 Message Date
Seungha Yang
bf98e200b2 mfdevice: Unregister device notification callback on stop
... as intended

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8405>
2025-02-03 22:34:27 +00:00
Seungha Yang
972da9cab9 mfvideoenc: Fix profile string check
profile_str is not std::string. Use strcmp instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8405>
2025-02-03 22:34:27 +00:00
Seungha Yang
73f8de3305 mfdevice: Fix memory leak
Release resources on dispose() as intended

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8405>
2025-02-03 22:34:27 +00:00
Seungha Yang
91def8d4ad meson: Check d3d12video header for MinGW build
Old MinGW toolchain does not ship the header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8400>
2025-02-03 21:24:47 +00:00
Michael Tretter
1a8143f721 videotestsrc: fix build if adder is disabled
The videotestsrc is not build if the adder plugin is disabled. This is a
copy/paste error introduced in Commit 3de86b2b97 ("docs: port plugins to
explicit sources").

Fix the check to actually test the 'videotestsrc' option.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8399>
2025-02-03 18:57:34 +00:00
Sebastian Dröge
97a6a8213c avcodecmap: Use gst_value_list_append_and_take_value() in two places
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8379>
2025-02-03 16:07:37 +00:00
Sebastian Dröge
6d772f6ba3 avcodecmap: Use actually supported channel counts for S302M
Only 2/4/6/8 channels are supported. Also this makes sure that the correct
sample rate is enforced (48kHz) in the template caps instead of allow any sample
rate and failing at runtime.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8379>
2025-02-03 16:07:31 +00:00
Sebastian Dröge
a1c123d342 cc708overlay: Deprecate element in favour of cea708overlay
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3459

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8397>
2025-02-03 09:51:53 +00:00
Tomas Granath
fa9b630fc8 matroskademux: Mark streams as EOS when outside the requested segment
Ensure that streams with no (more) data are marked as EOS when
advancing past the requested segment. Without this change the
EOS would be postponed to the end of the file in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8395>
2025-02-03 09:06:28 +00:00
Seungha Yang
353d963c77 d3d12mipgen: Respect requested mip levels
Don't waste GPU power by generating more levels than requested

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8394>
2025-02-02 21:01:42 +09:00
Seungha Yang
1dc09d67fe d3d12mipgen: Serialize root signature only once
... and reuse serialized blob

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8394>
2025-02-02 20:51:43 +09:00
Carlos Bentzen
4b0d555056 libav: add support for VVC/H.266 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7637>
2025-02-02 08:53:33 +00:00
Ruben Gonzalez
df7a8c8c40 meson: use nls option to ENABLE_NLS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7017>
2025-02-01 12:27:01 +00:00
Andoni Morales Alastruey
44720cd2f4 pre-commit: add documentation on how to use it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192>
2025-01-31 19:15:26 -03:00
L. E. Segovia
2e11649264 docs: Move all references to gst-indent-1.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192>
2025-01-31 19:15:26 -03:00
Andoni Morales Alastruey
4ad6d4f99d csharp: do not format autogenerated code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192>
2025-01-31 19:14:43 -03:00
Tim-Philipp Müller
eaec7d9acb bad: tools: update gst-{app,element,project}-maker for new gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192>
2025-01-31 19:14:43 -03:00
Tim-Philipp Müller
bc83c07727 scripts: update update-orc-dist-files.py scripts for new gst-indent
And fix python indentation with autopep8

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192>
2025-01-31 19:14:43 -03:00
Tim-Philipp Müller
41c097ed6c docs: update contributing + FAQ docs for gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192>
2025-01-31 19:14:43 -03:00
L. E. Segovia
fab3da528e gst-indent: build our own indent tool and make it available in the devenv
No more formatting mismatches owing to different GNU indent
versions shipped by different distro versions.

See #340

Co-authored-by: L. E. Segovia <amy@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192>
2025-01-31 19:14:41 -03:00
Carlos Bentzen
8b464cd282 libav: map GST_VIDEO_FORMAT_GRAY10_LE16 to AV_PIX_FMT_GRAY10LE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8388>
2025-01-31 14:17:05 +00:00
Seungha Yang
cc6941ed9a d3d12converter: Fix SRV descriptor heap size
Converter was allocating smaller size of descriptor heap
than required size when auto-mipgen is enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8391>
2025-01-31 13:16:50 +00:00
Seungha Yang
a91275a71e examples: Add h264parser example
An example to show how to detect frame type using h264parser

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8338>
2025-01-31 10:53:19 +00:00
Jan Schmidt
31a3172bfe v4l2vidoedec: Fix caps negotiation in non-DRM case
Append acquired_caps to the filter_caps being built,
instead of a 2nd copy of acquired_drm_caps.

Fix a regression introduced in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7633
when downstream doesn't support DRM output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8385>
2025-01-30 12:33:07 +00:00
Piotr Brzeziński
a88eda66d2 osxaudio: Always expose max amount of channels with no positions
For outputs with a high number of channels, macOS has a bug where
initially CoreAudio will report incorrect positions for all channels,
but after you run Audio MIDI Setup and configure the speaker layout
there, macOS will always report those few as positioned, with no option
to revert that (other than deleting some internal files).

In such scenario our code would just ignore all the unpositioned
channels. Since you can only position max. 16 channels in macOS, if you
had more on your output device, those would be unusable.

This commit makes sure that in addition to the usual positioned layout
(if there is one), we will expose caps for a no-positions layout that
always has the maximum amount of channels available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8311>
2025-01-30 09:53:15 +00:00
Piotr Brzeziński
c5c5327df6 osxaudio: Work around invalid channel positions from CoreAudio
By default, for devices with larger amounts of outputs, CoreAudio can
provide invalid channel labels/positions, simply by starting at 0 and
incrementing forward. For example, values 19 through 32 are not valid
according to the CoreAudioBaseTypes.h header, but if your device has >19
output channels, you will find CoreAudio using those values.

This is most likely a bug in CoreAudio, since in that case it should use
unpositioned labels (e.g. _Discrete_X) instead.

This commit aims to work around this by overriding all channels to be
unpositioned if the case above is detected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8311>
2025-01-30 09:53:15 +00:00
Sebastian Dröge
83e95af6e3 mpegtsdescriptor: Add (transfer none) annotation to out parameter of parse_registration()
Out parameters are (transfer full) by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8380>
2025-01-30 01:06:55 +00:00
Colin Kinloch
e0e7a11089 wayland: De-dupe filling caps format fields
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8268>
2025-01-29 21:04:16 +00:00
Nicolas Dufresne
d327b576fd v4l2codecs: format: Fix tiled stride with modifiers
After a bit of back and forth, we figure-out that for backward
compatibility we need to set the tile stride the way GStreamer
defines it. Sinks such as glimagesink/waylandsink translate it
back to the number of bytes representation used by Linux.

The change in !7355 when the other way around, breaking tiled
playback through waylandsink and glimagesink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7892>
2025-01-29 17:20:33 +00:00
Nicolas Dufresne
902f0eb9ea video: Add DMA_DRM mapping for NV12_16L32S / MT2110T / MT2110R
This is used on Meditek SoC and Mesa Panfrost [0] has enabled the 8bit variant
with a faster GL shader implementation then ours.

[0] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31899

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7892>
2025-01-29 17:20:33 +00:00
Nicolas Dufresne
2be6b66349 video: Import a verbatim copy of drm_fourcc.h
Imported from drm-tip [0] at commit 3ab334814dc7dff39075e055e12847d51878916e.
As the copied definition became bigger an bigger, it was quite apparent this
was more work then needed. Simply replace manual copies with a verbatim
official copy of it.

[0] https://gitlab.freedesktop.org/drm/tip/-/blob/drm-tip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7892>
2025-01-29 17:20:33 +00:00
Robert Mader
1fc6f0d349 qtmux: Implement rotation tag support
Mirroring the demux element and isomp4mux from gst-plugins-rs.

Tested against other Gst elements and MPV. Note that the later
apparently does not show correct results for flipped values.

Can be tested with:
```
gst-launch-1.0 \
videotestsrc num-buffers=90 ! \
taginject tags="image-orientation=rotate-90" ! \
capsfilter caps=video/x-raw,width=640,height=480,max-framerate=30/1 ! \
videoconvert ! \
queue ! \
openh264enc ! \
queue ! \
h264parse ! \
mp4mux ! \
filesink location=./test.mp4
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8371>
2025-01-29 16:24:21 +00:00
Colin Kinloch
edf157beb5 wayland: Don't filter out unrecognised DRM formats
There is no requirement for a base DRM format to be supported by libgstvideo
in order to be uploaded to.

The linux-dmabuf-v1 format events are DRM_FORMAT codes and don't need to
be converted before use with `gst_video_dma_drm_fourcc_to_string`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8279>
2025-01-29 15:23:57 +00:00
Zhao, Gang
705b142134 fdsrc: Add property is-live
Fixed #4184

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8372>
2025-01-29 12:46:56 +00:00
Alexander Slobodeniuk
6376849396 qtmux: fix critical warnings on negotiation error
This pipeline fails to negotiate on my PC:

gst-launch-1.0 v4l2src ! h264parse ! qtmux ! filesink location=t.mp4

When it happens some critical glib warnings are emitted:
-------------------------------
GStreamer-CRITICAL **: 15:09:03.485: gst_mini_object_copy: assertion 'mini_object != NULL' failed

GStreamer-CRITICAL **: 15:09:03.485: gst_mini_object_unref: assertion 'mini_object != NULL' failed

GStreamer-CRITICAL **: 15:09:03.485: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

GStreamer-CRITICAL **: 15:09:03.485: gst_structure_set_value: assertion 'structure != NULL' failed

GStreamer-CRITICAL **: 15:09:03.485: gst_mini_object_unref: assertion 'mini_object != NULL' failed
--------------------------------

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8374>
2025-01-29 10:46:25 +00:00
L. E. Segovia
41b779e57c meson: Add python-exe option to override target Python installation
Fixes #4185

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8337>
2025-01-28 17:31:12 +00:00
Jan Alexander Steffens (heftig)
7abece4416 cccombiner: Restore QoS messaging
Reimplement the QoS message generation that was lost together with the
caption frame counting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7996>
2025-01-28 14:51:19 +00:00
Jan Alexander Steffens (heftig)
3c5f03dce1 cccombiner: Clean up property mutability
Most settings are copied from properties on the READY → PAUSED state
change. The recently added properties violate this scheme, and are
probably unsafe to change.

Make these properties consistently MUTABLE_READY. Also remove the unused
`output_padding` field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7996>
2025-01-28 14:51:19 +00:00
Jan Alexander Steffens (heftig)
26c598dd1b tests: cccombiner: Test rescheduling 50fps to 25fps w/o overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7996>
2025-01-28 14:51:19 +00:00
Jan Alexander Steffens (heftig)
b29262e662 cccombiner: Replace caption frame counting with max_buffer_time
The counting is defective when we are combining with a stream that has a
higher max_cea608_count (such as 60p to 30i), as we produce less caption
frames than we consume, leading to periodic queue drops.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7996>
2025-01-28 14:51:19 +00:00
Jordan Yelloz
2619a59f82 gstiterator: Added error handling to filtered iterators
Otherwise, if the underlying iterator returns GST_ITERATOR_ERROR, the filtered
iterator will crash.

With this change, the filtered iterator propagates the error back to the caller.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8367>
2025-01-28 06:31:09 +00:00
Tomas Granath
49e4c0b451 oggdemux: Do not change total duration until new duration is found
After calculating a correct duration the oggdemux in some cases sets the duration to GST_CLOCK_TIME_NONE.
After that any seek will fail due to the oggdemux calculating a target time after the actual duration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8296>
2025-01-27 17:13:38 +00:00
Alicia Boya García
794ad2841a docs: Fix log category names in the log tracer
The documentation was incorrectly referring to `GST_QUERY` and `GST_BIN`
as GstDebug category names.  These two don't follow the pattern of the
rest, and instead are named `query` and `bin` respectively.

This can be verified from the source code of the _do_init macro in the
same gstlog.c file, and from gstbin.c and gstquery.c calls to
GST_DEBUG_CATEGORY_INIT().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8365>
2025-01-27 15:24:29 +00:00
Alicia Boya García
a6dcbf9446 tracers: log: Fix wrong argument in do_chain_buffer_pre()
The third argument of the pad-chain-pre and pad-chain-post hooks are of type GstBuffer* and GstBufferList* respectively.

However, when I added do_chain_buffer_pre() and do_chain_buffer_post()
to gstlog.c I accidentally make them take GstFlowReturn -- almost
certainly as an artifact from duplicating the code of the _post()
variants, leading to erroneous log lines like this:

```
do_chain_buffer_pre:<vp9parse0:sink> 0:00:01.615378540, pad=<vp9parse0:sink>, res=-1073639680
```

This patch fixes that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8366>
2025-01-27 14:44:02 +01:00
Alicia Boya García
6d9552295f tracing: add hooks for gst_pad_send_event_unchecked()
Similar to de30de865c, this allows to follow the flow of events as they
arrive to a pad rather than only when they are pushed to a peer.

The hook is installed in gst_pad_send_event_unchecked() instead of
gst_pad_send_event() because the latter is often omitted: that is the
case especifically in gst_pad_push_event_unchecked(), where most event
propagation occurs.

This patch also makes use of the new hooks in the log tracer to log the
begining and end of the send_event processing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8330>
2025-01-27 11:08:52 +00:00
Alicia Boya García
a35bf1e384 tracers: signal pad-push-event when pushing sticky events
Previously, the tracer pad-push-event was only signalled on
gst_pad_push_event().  However, the sticky event handling code in
GStreamer uses gst_pad_push_event_unchecked() instead, which meant those
events were not logged.

This patch extends the definition of the pad-push-event tracer to cover
both calls to gst_pad_push_event() and any direct calls to
gst_pad_push_event_unchecked() that skip the former inside GstPad
private code.

gst_pad_push_event_unchecked() returns GstFlowReturn instead of
gboolean like gst_pad_push_event(). To maintain API compatibility, the
GstFlowReturn is converted to gboolean.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8342>
2025-01-27 08:56:03 +00:00
Sebastian Dröge
fb2337ea82 netclientclock: Don't stop searching the clock cache when the first corrupted clock is found
The clock we're looking for might be working fine and be available afterwards.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8334>
2025-01-27 07:47:05 +00:00
Sebastian Dröge
dd58ae8cc8 netclientclock: Don't ever store failed internal clocks in the cache
If starting the internal clock fails we would still store a broken clock in the
cache despite it being unusable and never recovering.

Not storing it allows the application to simply create a new one at a later time
and have starting it retried.

Also signal to the application that such a clock is not synced.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8334>
2025-01-27 07:47:05 +00:00
Brad Hards
154ea45111 taginject: typo fix in usage example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8362>
2025-01-26 20:21:58 +00:00
Arun Raghavan
4cd63e09d9 webrtcdsp: Use C++20 with MSVC if needed
The subproject fails on vs2022 builds with:

[...]agc2/input_volume_stats_reporter.cc(89): error C7555: use of designated initializers requires at least '/std:c++20'

So let's force C++20 in this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8270>
2025-01-26 12:30:01 -05:00