Commit graph

45 commits

Author SHA1 Message Date
Lucas Holt
4c3f5a7655 When adding MidnightBSD support, I inversed the condition here. 2022-07-08 12:25:58 +02:00
Lucas Holt
6a15a02ec2 Add support for MidnightBSD
Fix build issue

Fix build issue
2022-06-19 18:22:47 +00:00
Wim Taymans
9493dafe44 vulkan: update example shaders 2022-06-06 12:13:20 +02:00
Wim Taymans
80f317344e vulkan: fix validation errors 2022-06-06 12:13:20 +02:00
Wim Taymans
d40e6aeedd vulkan: use image sampler 2022-06-06 12:13:20 +02:00
Wim Taymans
b02ebec954 vulkan: use images
The filter can now run shadertoy filters.
2022-06-06 12:13:20 +02:00
Wim Taymans
24fc972164 vulkan: add some more error checks 2022-06-06 12:13:20 +02:00
Wim Taymans
6e681fc98d vulkan: more improvements 2022-06-06 12:13:19 +02:00
Wim Taymans
e6f01563ab vulkan: support multiple streams of buffers 2022-06-06 12:13:19 +02:00
Wim Taymans
332e8b7029 vulkan: start of vulkan filters 2022-06-06 12:13:19 +02:00
Wim Taymans
9071678643 spa: set port flags on port info 2022-05-26 10:39:31 +02:00
Wim Taymans
2f5bba112f spa: Improve PropInfo fields
The PropInfo either has a registered id (and then also a name from the
type-info) or a custom name as a string.
In all cases, the description contains a free form text that clarifies
the property.

Use the description in the stream controls name.
2022-03-30 17:09:08 +02:00
Barnabás Pőcze
60b9d9081b spa: only remove embedded source from data loop from within the loop
Use `spa_loop_invoke()` to invoke a callback on the data loop
to remove an embedded `spa_source` from the data loop.

Embedded `spa_source` objects cannot be safely removed
while the loop is polling without risking potential
use-after-frees.
2022-03-06 18:40:43 +00:00
Wim Taymans
35cbe4e939 buffers: make alignment optional
Make the alignment parameter optional when negotiating buffers.
Default to a 16 bytes alignment and adjust for the max cpu
alignment.
Remove the useless align buffer parameter in plugins, we always
set it to 16 anyway.
2022-01-03 12:32:26 +01:00
Barnabás Pőcze
2b110af366 treewide: meson.build: use dependency variable for SPA
Use `spa_dep` everywhere instead of `spa_inc`,
and remove `spa_inc` altogether.
2021-12-28 18:34:06 +01:00
Peter Hutterer
ebda71d489 spa: fix the indentation in the various meson.build files
Was all over the place using tabs and spaces, let's make this more
consistent.
2021-09-20 07:29:03 +00:00
George Kiagiadakis
36c7e820d8 test nodes: make the timerfd non-blocking
Relates to #1377
2021-07-01 11:52:35 +03:00
Barnabás Pőcze
f5d51162c4 treewide: mark things static and const
Mark some structures, arrays static/const at various places.
In some cases this prevents unnecessary initialization
when a function is entered.

All in all, the text segments across all shared
libraries are reduced by about 2 KiB. However,
the total size increases by about 2 KiB as well.
2021-06-30 14:44:08 +02:00
Wim Taymans
46ef88e520 spa: save the old change_mask and restore when emitting full
When we add a new listener to an object, it will emit the full state
of the object. For this it temporarily sets the change_mask to all
changes. Restore the previous state after this or else we might not
emit the right change_mask for the next listener.

Consider the case where one there are two listeners on an object.
The object emits a change and the first listener wants to enumerate the
changed params. For this is adds a new listener and then triggers the
enumeration. If we set the change_mask to 0 after adding the listener,
the second listener would get a 0 change_mask and fail to update
its state.
2021-05-27 15:21:44 +02:00
Peter Hutterer
7697ed0757 treewide: replace strcmp() == 0 with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
223f20709d meson: replace join_paths(a, b) with a / b
More readable and from the meson reference manual:
(since 0.49.0) Using the/ operator on strings is equivalent to calling join_paths.
2021-04-15 06:57:00 +00:00
Wim Taymans
4f60dcadc6 vulkan: check results of stat 2020-05-20 15:24:25 +02:00
Wim Taymans
f1dc3d9728 vulkan: fix macro variables 2020-05-20 15:24:25 +02:00
Wim Taymans
aafd1e7298 improve debug
Improve log so that debug level 3 gives a reasonably readable overview
of what is going on.
2020-04-22 12:47:18 +02:00
Wim Taymans
ab3a6d3441 Fix some compiler warnings on arm 2020-04-03 13:18:02 +02:00
Gleb Popov
b552863ec9 Don't include alloca.h on FreeBSD. 2020-03-31 12:16:45 +02:00
Wim Taymans
3cb019de51 vulkan: only set flags when buffer is in the io area 2020-03-19 18:09:30 +01:00
Wim Taymans
b6dde8d76f vulkan: use image height of current cycle for buffer size 2020-03-18 17:21:38 +01:00
Wim Taymans
64e00165d5 Add MIT licensed compute example instead
Fixes #218
2020-03-18 17:20:36 +01:00
Wim Taymans
50ce87df32 node: we are supposed to produce data when != HAVE_DATA
We can produce data whenever the io area status != HAVE_DATA. We
don't need to look for NEED_DATA.
Also recycling buffer happens whenever the status != HAVE_DATA.
2020-02-04 12:59:16 +01:00
Wim Taymans
65caf8832c spa: install in versioned directory
So that we can run old and new plugins side by side.
2020-01-29 15:51:41 +01:00
Wim Taymans
852ac043d3 Use the DSP format for dsp formats
Use the DSP media subtype to describe DSP formats. DSP formats
don't include the rate, channels and channel position in the
format and must use the rate and duration from the position io. This
makes it possible to later change the samplerate dynamically without
having to renegotiate the graph.

The same goes for the video DSP format, which uses the io_video_size
from the io_position to get the size/stride. Set this up in the node
based on the defaults from the context.

Make it possible to define defaults in the daemon config file, such
as samplerate, quantum, video size and framerate. This is stored in
the context and used for the DSP formats.
2020-01-09 15:18:59 +01:00
Wim Taymans
f391353c7f Make interface types a string
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
2019-12-19 13:36:04 +01:00
Wim Taymans
feb8dd3a34 Add include of keys.h 2019-11-21 09:34:08 +01:00
Wim Taymans
68e94a2e7e system: use spa_system functions for fds 2019-11-19 13:41:40 +01:00
Wim Taymans
4f5a5fc917 vulkan: tag port as video DSP port 2019-10-28 13:20:42 +01:00
Wim Taymans
9ffec214b8 fix includes 2019-10-25 15:01:02 +02:00
Wim Taymans
38bc80a3b8 remote-node: implement suspend 2019-10-23 17:20:46 +02:00
Wim Taymans
6e0ffb0c47 flags: change flag macros
SPA_FLAG_CHECK -> SPA_FLAG_IS_SET
SPA_FLAG_UNSET -> SPA_FLAG_CLEAR
Add SPA_FLAG_UPDATE
2019-10-02 18:00:42 +02:00
Wim Taymans
990ecd20c5 vulkan: handle older versions
Fixes #183
2019-09-27 10:53:36 +02:00
Wim Taymans
8b85cc225e rename HAVE/NEED_BUFFER -> HAVE/NEED_DATA
It is more generic and works with control-only ports as well
2019-09-16 12:55:23 +02:00
Wim Taymans
2d8bce7479 names: add vulkan compute source factory name 2019-09-10 12:38:25 +02:00
Wim Taymans
4f31ca5383 vulkan: only send out buffers when ready
Keep track of the buffer that is rendering and when it finishes,
move it to the ready queue.
2019-08-19 18:16:32 +02:00
Wim Taymans
38169ec5db vulkan: update some properties 2019-08-19 16:47:02 +02:00
Wim Taymans
9799b0e679 vulkan: add vulkan compute source
Add a source that runs a compute shader and exports the GPU buffer
as a DmaBuf to the clients.
2019-08-19 16:32:22 +02:00