Commit graph

3806 commits

Author SHA1 Message Date
George Kiagiadakis
ba653fccfc add .editorconfig files
These files help editors choose the correct coding style
conventions, mostly useful for the indentation style

Pipewire uses tab characters of size 8 in all of its codebase
except in the meson files and in the gstreamer plugins,
which use 2-space indentation
2019-02-13 11:19:21 +01:00
Wim Taymans
ac5ec9bbe2 device: improve callbacks
Pass info structures to device callbacks to make it more extensible.
Also notify about the supported params on the device because we
can.
2019-02-13 11:13:46 +01:00
Wim Taymans
5de7898808 node: implement activation
Make an eventfd for each node and listen for events when the node
is activated.
Reorganize some graphs links to make it possible to activiate nodes
by signaling the eventfd
Pass the peer node to each remote node and let the remote node
directly activate the peer when needed.
Let each node signal the driver node when finished.
With this we don't need to go through the daemon to schedule the
graph, nodes will simply activate eachother. We only go to the
server when there is a server node to schedule.
Keep stats about the state of each node and the time it was
triggered, running and finished.
2019-02-12 17:42:33 +01:00
Wim Taymans
f45e0b8966 reorganize some struct members to remove holes 2019-02-08 12:01:50 +01:00
Wim Taymans
658c1da52f node: allocate shared mem for activation
Allocate a per node a piece of shared memory where we place the
activation structure with the graph state and io_position.
We can then give this info to nodes so that they can get the position
in the graph directly but also later, activate the next node in
the graph.
2019-02-07 12:34:54 +01:00
Wim Taymans
db230fc136 floatmix: unroll loop a little 2019-02-07 12:30:36 +01:00
Wim Taymans
8a9c1129a2 spa: make fd in spa_data an int64_t
So that we can store other things in it later as well.
2019-02-07 12:22:51 +01:00
Wim Taymans
569cbb48a9 use SPA_EXPORT to export symbols 2019-02-06 13:24:41 +01:00
Wim Taymans
baa6b1472d client-node: handle _set_io on the node 2019-01-31 17:50:55 +01:00
Wim Taymans
bad9b15a92 node: warn when _set_io fails on the node 2019-01-31 17:50:16 +01:00
Wim Taymans
550a2af044 examples: improve examples 2019-01-31 11:58:35 +01:00
Wim Taymans
31dacd9d6f remote: move node export code to client-node module
Make the code to export objects more generic. Make it possible for
modules to register a type to export.
Make the client-node also able to export plain spa_nodes.
Let the remote signal the global of the exported object if any. We can
then remote the (unused) remote_id from the proxy.
2019-01-31 11:02:13 +01:00
Wim Taymans
7ec9de5ac6 video-src: always set chunk info 2019-01-31 10:59:43 +01:00
Wim Taymans
61194d02b3 stream: small cleanups in notify/control handling 2019-01-30 11:01:17 +01:00
Wim Taymans
2f102a69d6 export-source: fix example 2019-01-30 10:50:42 +01:00
Wim Taymans
39f1309130 conf: remove old module 2019-01-30 10:50:23 +01:00
Wim Taymans
4509bd8cfd media-session: report error when binding 2019-01-30 10:36:00 +01:00
Wim Taymans
e4f58da013 properties: handle prealloc of 0
The argument to array_init is not the prealloc but the extend, so
passing 0 will not work
2019-01-29 16:52:21 +01:00
Wim Taymans
086166058a media-session: handle unknown media 2019-01-29 16:51:55 +01:00
Wim Taymans
bf33ce3fc0 link: don't call use_buffers after alloc_buffers 2019-01-29 12:04:31 +01:00
Wim Taymans
e63adfef25 link-factory: fix cleanup
If the link is destroyed, remove the listeners. Only remove the
resource listener when we actually have one.
If the resource is destroyed first, destroy the global.
If the global is destroyed first, make sure we don't destroy it
again when the resource is destroyed.
2019-01-29 10:45:28 +01:00
Wim Taymans
beae1890d3 global: first emit then destroy, then unregister 2019-01-29 10:31:48 +01:00
Wim Taymans
718847fcd5 audio-dsp: clean ports when the node is destroyed 2019-01-29 10:30:01 +01:00
Wim Taymans
11769aa7e7 media-session: track our DSP link
Set our DSP link proxy to NULL when it gets destroyed so that we
don't accidentally try to do things with it anymore.
2019-01-29 10:29:06 +01:00
Wim Taymans
ac6a568729 global: remove the global from the map when we unlink 2019-01-29 09:51:20 +01:00
Wim Taymans
1c7fa34f57 port: make it possible to clear the mix node again 2019-01-29 09:50:50 +01:00
Wim Taymans
7a8412e81a alloc: document alloc functions 2019-01-25 15:55:39 +01:00
Wim Taymans
93e8074b2c alloc: improve alignment in alloactor
link: use buffer allocator
Add more tests
2019-01-25 13:32:35 +01:00
Wim Taymans
13bf70a8dd mem: align memory to requested alignment
Improve the allocators to always align the buffer memory to the
requested alignment
Use aligned read and writes for sse functions and check alignment,
optionally falling back to unaligned path.
Add more tests and benchmark cases
Check and warn for misaligned memory in plugins.
2019-01-24 18:28:52 +01:00
Wim Taymans
351fb9ce29 pod: improve parser and builder
Remove the spa_pod_iter helpers
Remove builder/parser vararg recurse option, you have to
manually recurse into structures when needed. This simplifies
things a lot.
Pass spa_pod_frames to builder and parser explicitly, we don't
have to keep an internal stack anymore.
The parser is now almost a mirror image of the builder.
Make the parser safer when iterating over objects, add functions
to check and get pod contents in a safe way.
Make the builder return errno style results on errors
Improve performance of object properties when they are stored and
retrieved in the same order.
Add many more tests for the builder and parser
Add some benchmarks
2019-01-22 17:38:23 +01:00
Wim Taymans
2622e085a9 pod: add more helpers
Implement more unit-tests
2019-01-17 17:23:47 +01:00
Wim Taymans
5376832676 builder: control_header -> control 2019-01-17 17:11:58 +01:00
Wim Taymans
92e9d99d0a add some padding and fix types 2019-01-16 17:37:58 +01:00
Wim Taymans
80cfda89c1 pod: improve the vararg pod builder and parser
Automatically parse and build key/value when in objects without having
to prefix the key with ":"
Automatically build control/value when in sequence without the "."
prefix.
Remove the builder with key/pod, taking a reference to the stack built
temporary pods is not allowed in c++. We can use the varargs version
with the same convenient syntax.
Remove the parser "*" option, it is unused.
Improve spa_pod_builder_add_* and spa_pod_parser_get_* and make them
look similar.
2019-01-16 11:05:12 +01:00
Wim Taymans
3dc6820e9e Don't use __ in defines or declarations, it's reserved
SPA_TYPE -> SPA_TYPE_INFO for type info strings
improve includes

Fixes #115
2019-01-14 13:00:00 +01:00
Wim Taymans
6856f02cab properties: avoid NULL and empty keys
Improve unit test
2019-01-11 12:24:40 +01:00
Wim Taymans
9dc9e97c6f tests: add more properties tests
Fix properties n_items counter
2019-01-11 11:25:53 +01:00
Wim Taymans
7216f4d4ac tests: add test for properties 2019-01-11 10:24:25 +01:00
Wim Taymans
4dcdbe1795 tests: add test for utils 2019-01-10 17:58:37 +01:00
Wim Taymans
6a637a8f24 tests: add test for interfaces 2019-01-10 17:20:45 +01:00
Wim Taymans
eaa5beb1b0 cli: add get-permissions method 2019-01-10 16:38:52 +01:00
Wim Taymans
74dd7c9bac client: implement get_permissions 2019-01-10 16:38:24 +01:00
Wim Taymans
b05297a5fb client: only set client active once
We already set the client active when we update the properties and
only when there were actually any updates.
2019-01-10 16:37:13 +01:00
Wim Taymans
c2f0dea0f5 client: rework permissions
Keep the default permission at index 0 in our permission array.
2019-01-10 16:36:33 +01:00
Wim Taymans
2ab96db5b5 protocol: fix permission marshal, skip default permissions 2019-01-10 16:35:25 +01:00
Wim Taymans
a55330fe29 cli: fix node-params 2019-01-10 13:16:31 +01:00
Wim Taymans
01e28dd7a8 cli: copy name 2019-01-10 13:16:11 +01:00
Wim Taymans
1cb8a61b71 interfaces: make permissions const 2019-01-10 12:29:21 +01:00
Wim Taymans
103249ae76 interfaces: remove core properties update
Use the update_properties method on the client
2019-01-10 12:17:58 +01:00
Wim Taymans
0072f9cf2b interfaces: add method to update properties 2019-01-10 11:55:04 +01:00