Commit graph

1135 commits

Author SHA1 Message Date
Nicolas Dufresne
96a2408147 glcolorconvert: Fix syntax error in detiling shader
Mesa compiler complains of:
    error: `rgba' redeclared

This regression got introduced by 674e643428, which introduce
colormatrix computation without revoing the pre-declaration of
rgba variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7231>
2024-07-25 14:10:52 +00:00
Shengqi Yu
df28aceb49 videoscale: correct classification error
videoscale does not have convert function, so remove the convert
description in it's classification. Otherwise, if we want use
autovideoconvert to convert colorsapce, autovideoconvert will select
videoscale to do convert and this will cause to fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7215>
2024-07-25 05:42:25 +00:00
Nirbheek Chauhan
2ee51bf6f6 glvideomixer: Fix critical when setting start-time-selection
It caused a critical, but did not affect functionality because the
GValue was passed as-is to the glvideomixerelement which actually does
something with the property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7204>
2024-07-20 01:05:58 +00:00
Nirbheek Chauhan
6ce72488fa Revert "meson: Fix invalid include flag in uninstalled gl pc file"
This reverts commit 9d719b9937.

The old pkg-config implementation errors out if a variable specified
in the pkgconfig file is not defined, so this actually broke
uninstalled pc files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7191>
2024-07-19 14:46:36 +00:00
Jakub Adam
9629d78b7c gstvideoaggregator: preserve features in non-alpha caps
Fixes caps negotiation when sink template caps of an element inheriting
GstVideoAggregator have features different from the implicit
"memory:SystemMemory".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7102>
2024-07-18 14:17:45 +02:00
Sebastian Dröge
a7bba83ded typefind: Add typefinders for formats that were previously available via ffmpeg
Co-Authored-By: Matthew Waters <matthew@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:39 +00:00
Nirbheek Chauhan
fd971ed9d8 docs: CI insists that this docs update must be applied
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7130>
2024-07-05 16:20:22 +00:00
Nirbheek Chauhan
9d719b9937 meson: Fix invalid include flag in uninstalled gl pc file
${libdir}/gstreamer-1.0/include is only valid after installation, but
extra_cflags are added unconditionally, so we can't use that for
include flags.

Instead, let's add the include flag via variables, which are different
for installed and uninstalled pc files.

This is particularly bad for consuming GStreamer via CMake which barfs
on non-existent include paths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7130>
2024-07-05 16:20:22 +00:00
He Junyan
9f1887a623 glupload: Add a comment in DMA's propose_allocation query for video meta
The video meta API now is a mandatory request for DMA kind negotiation. In
current code, the raw method always adds that video meta API in the query
of propose_allocation(), so we do not need to do the duplicated task here.
Just adding a comment to declare that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6698>
2024-07-04 08:54:15 +00:00
Tim-Philipp Müller
6cc25bd630 subparse: remove regex optimized flag explicitly
That way the other flags in jit_flags are not touched and
flags changes in future only need to be done in one place.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7126>
2024-07-03 03:46:19 +00:00
Tim-Philipp Müller
084f6b3fbe gst-plugins-base: put valgrind header availability define into config.h for subparse
Make the valgrind header avaibility accessible to any code in
gst-plugins-base, currently it was only signalled to unit tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7126>
2024-07-03 03:46:19 +00:00
Edward Hervey
01b397601f subparse: Don't use jitted regex when used with valgrind
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7117>
2024-07-02 09:44:25 +02:00
Edward Hervey
2c1c1ec575 encoding-target: Chain up to parent class
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Edward Hervey
651568d543 encoding-profile: Chain up to parent class finalize
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Xavier Claessens
84b3a0950d build: Add missing common options that are yielding in subprojects
- Align `glib_debug`, `glib_assert` and `glib_checks` options with GLib,
  otherwise glib subproject won't inherit their value. Previous names
  and values are preserved using Meson's deprecation mechanism.
- Add `extra-checks` and `benchmarks` options in the main project so it
  can be inherited in GStreamer subprojects.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1165>
2024-06-27 15:53:46 +00:00
Seungha Yang
fca7e5aa23 video: convertframe: Add support for d3d12 conversion
Use d3d12convert in case of d3d12 memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7095>
2024-06-26 17:56:41 +00:00
George Hazan
9e1abc0797 parsebin: fix compilation problem with Visual C++ 2017
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7089>
2024-06-22 20:56:03 +03:00
Edward Hervey
11ff2b2835 decodebin3: Fix keyframe drop probe handling
We were storing the probe id in a different structure (DecodebinOutputStream)
than the pad it is targetting (which is in MultiQueueSlot).

The problem is that when re-targetting outputs (to a different slot)... we would
end up having an invalid probe id, or not have a reference to an existing one.

Instead, store the probe id in the same structure as the pad it's targetting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7069>
2024-06-20 12:56:46 +00:00
Edward Hervey
6aa0c8442d decodebin3: Fix detection of selection done
We should not assert if there are still some old streams that are waiting to be
deactivated.

Instead wait for them to be gone before posting the selection done message

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7069>
2024-06-20 12:56:46 +00:00
Sebastian Dröge
9da1268656 video-info: Don't crash in gst_video_info_is_equal() if one videoinfo is zero-initialized
Instead handle it like gst_audio_info_is_equal() and consider both different.
And also add a shortcut for the pointers to both infos being equal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7055>
2024-06-18 17:47:14 +00:00
Alicia Boya García
223b63b1d2 decodebin3: Add missing INPUT_LOCK() before ensure_input_parsebin()
ensure_input_parsebin() has a top comment saying it must be called with
INPUT_LOCK taken, but 2 out of 3 usages of the function call it without
taking that mutex.

This patch adds locking in these two remaining usages.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5279>
2024-06-17 10:15:28 +00:00
Edward Hervey
c5a39f2dfa uridecodebin3: Don't hold PLAY_ITEMS lock when activating them
Once the item is configured it can be activated without holding that lock

Fixes #3610

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7015>
2024-06-11 16:42:27 +00:00
Edward Hervey
74dbbe0091 decodebin3: Always ensure we end up with parsebin or identity
This fixes a regression introduced by 6c4f52ea20

There are cases where the input stream will be push-based, time-segment and not
have a collection nor caps. This means the event-based checks are not sufficient
to decide when/where to plug in a identity or parsebin to process the input.

For those corner cases we setup a buffer probe to ensure we always end up with
at least a parsebin

Fixes #3609

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7010>
2024-06-11 14:57:34 +00:00
Guillaume Desmottes
81de6b7738 subparse: fix typefind with small srt files
The typefind code was rejecting content smaller than 128 bytes making it
impossible to play files with very small srt files.
But those can actually be properly detected so fix typefind to allow
smaller content and try its best with it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6937>
2024-06-07 11:28:49 +02:00
Guillaume Desmottes
f7c8f4bb26 subparse: add typefind tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6937>
2024-06-07 10:00:56 +02:00
Guillaume Desmottes
9e3b1cfc49 subparse: properly group caps
No semantic change, but the way caps and macros were grouped was
confusing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6937>
2024-06-07 10:00:56 +02:00
Nirbheek Chauhan
a1463637e0 pango: Add a property to compensate for display response time
When measuring video latency, one mechanism involves taking a photo
with a camera of two screens showing the test video overlayed with
timeoverlay or clockoverlay. In these cases, if the display's pixel
response time is crappy, you will see ghosting due to which it can be
quite difficult to discern what the current timestamp being shown is.

This commit adds a property that *also* shows the timestamp in
a different (sequentially predictable) location every frame, which
makes it easy to tell what the latest rendered timestamp is.

For bonus points, you can also use the fade-time of the previous frame
to measure with sub-framerate accuracy when the photo was taken, not
just clamped to the framerate, giving you a higher precision latency
value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6935>
2024-06-06 14:03:04 +00:00
Sebastian Dröge
a6a1fd03cc rtspconnection: Use GDateTime instead of gmtime()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6872>
2024-06-06 08:33:51 +00:00
Sebastian Dröge
c14a2d7d6d video: Document UL_LR / UR_LL video orientation methods correctly
They're not flipping along the diagonal axis but a flip and rotation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6936>
2024-06-05 11:37:13 +00:00
Edward Hervey
6c4f52ea20 decodebin3: Avoid usage of parsebin even more
When dealing with push-based inputs, we are now delaying the creation of
parsebin/identity until we get all pre-buffer events.

We therefore can simplify the handling of new pads being linked and only have to
check if upstream can handle pull-based or not.

Avoids creating parsebin for parsed upstream data altogether

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6953>
2024-06-04 14:44:14 +00:00
Jakub Adam
c56a87b73d gldownload: use gst_gl_sync_meta_wait_cpu()
Simple gst_gl_sync_meta_wait() is not sufficient to ensure GL commands
are executed before dma-buf devices get to see the buffer.

This is the first step that should make the code behave correctly for
everybody, although there may be performance penalty. In the future we
should introduce a more general sync meta that would allow to move the
waiting from gldownload (the producer) to the sink elements (the
consumers).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6968>
2024-06-01 08:09:34 +00:00
Edward Hervey
cb95ba72cf decodebin3: Include the stream-id in ERROR/WARNING/INFO messages
Allows application and other users to know to which stream the
error/warning/info message originated from.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6964>
2024-05-31 11:58:21 +00:00
Edward Hervey
686d980955 uridecodebin3: Specify URI for INFO/WARNING/ERROR messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6929>
2024-05-29 22:24:07 +00:00
Nirbheek Chauhan
fe1a7edda2 gl: Fix libdrm dependency detection and usage
drm_fourcc.h should be picked up via the pkgconfig dep, not the system
includedir directly. All this allows it to be picked up consistently
(via the subproject, for example).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6932>
2024-05-29 15:49:45 +00:00
Edward Hervey
94646c642d decodebin3: Specify stream-id for missing decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6886>
2024-05-29 11:44:06 +00:00
Edward Hervey
c987eaa427 pbutils: Missing plugin messages can contain the stream-id
In order to help users and applications, allow setting the stream-id for which
there is a missing plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6886>
2024-05-29 11:44:05 +00:00
Jakub Adam
859b1c8b63 glcolorconvert: update existing sync meta if outbuf has one
Instead of always adding a new one, which means the buffer could end up
with multiple sync meta instances.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6942>
2024-05-29 07:29:43 +00:00
Francisco Javier Velázquez-García
5fe7803128 docs: Correct pipeline examples in rawaudioparse
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6933>
2024-05-28 22:20:08 +00:00
Sebastian Dröge
bb6d737a1e typefind: Fix handling of ID_ODD_SIZE in WavPack typefinder
Chunks are always starting on an even position and this flag only
specifies that the last byte of the chunk is not valid.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6941>
2024-05-28 19:18:37 +00:00
Edward Hervey
39f62862d8 decodebin3: Ensure we get a collection for parsed inputs
When we are dealing with parsed inputs (i.e. using identity), we need to ensure
that we have a valid stream collection (and therefore DBCollection) before
anything flows dowsntream.

In those cases, we hold onto those events until we get such a collection.

Fixes #3356

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
daa022b9ee decodebin3: New mechanism for handling collection and selections
This commit separates collection and selections into a new separate structure:
DecodebinCollection.

This provides a much cleaner/saner way of dealing with collections being
updated, gapless playback, etc...

There is now a list of DecodebinCollection in flight, of which two are special:
* input_collection, the currently inputted/merged collection
* output_collection, the currently active collection on the output of multiqueue

Handling GST_EVENT_SELECT_STREAMS is split, by looking for the collection to
which it applies. And the requested streams are stored in it. IIF that
collection is output_collection we can do the switch, else it will be updated
when it becomes active.

Detecting which collection/selection is active is done by looking at the
GST_EVENT_STREAM_START on the output of the multiqueue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
c4b625a3fe decodebin3: minor refactoring to identify selected stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
bfb64f7f44 decodebin3: Debug line cleanups
Use identifiable items in log lines instead of random pointers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
39f2d96105 decodebin: Remove unused includes
* config.h is not used, plugin/element is registered in another file
* play-enum.h is not used

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
48cbb1c96f decodebin3: Remove un-needed variable
We don't do anything with the unknown streams. Detecting that a list of
requested streams don't apply to a given collection should be handled
before-hand

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
3acb219b76 decodebin3: Remove un-needed variable
pending_select_streams was only set just before releasing/taking the selection
lock in a single place. That temporary lock release is not needed and therefore
the variable isn't needed either

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
1ab0936196 decodebin3: Remove active_selection list
It's a duplicate of the list of slots which have an output. Use that instead.

Also when we fail to (re)configure an output, remove it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:17 +00:00
Edward Hervey
ec468e9524 decodebin3: Cache slot stream_id and rename more variables
* Move the handling of GST_EVENT_STREAM_START on a slot to a separate function

* There was a lot of usage of `gst_stream_get_stream_id()` for the slot
active_stream. Cache that instead of constantly querying it.

* Rename the variables in `handle_stream_switch()` to be clearer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
49cd8213bf decodebin3: Refactor slot/output (re)configuration
* Re-use existing function where possible
* Only set/reset keyframe probe at unique places

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00
Edward Hervey
faaedd2bb9 decodebin3: Refactor linking input to slot
The same sequence of calls was done when doing that

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6774>
2024-05-28 08:31:16 +00:00