Commit graph

3628 commits

Author SHA1 Message Date
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
Wim Taymans
1a27d7da1d interfaces: remove core permissions
Use the client update_permissions call instead
2019-01-10 11:09:05 +01:00
Wim Taymans
505eb7a423 protocol: automatically bind to the client as well
Bind to the client as well as the remote core. This way we will be
able to update our properties and permissions directly on the client.
2019-01-10 11:01:30 +01:00
Wim Taymans
77651881f7 improve debug 2019-01-10 11:00:50 +01:00
Wim Taymans
2f6c85cda1 remote: buffer id is now just the index of the buffer
Buffer id is only used internally as the index of the buffer
that was given to us by use_buffer or alloc_buffer
2019-01-10 10:20:26 +01:00
Wim Taymans
66bab1d9b2 remote: remove some events
Remove some events from the remote that we can find on the core_proxy.
Use the core_proxy to get to the done and info events.
Remove pw_remote_get_core_info(), we don't need this anymore now that
we don't listen for the event and the user can keep track of this
herself.
2019-01-10 10:08:14 +01:00
Wim Taymans
349a11cde5 add const to info 2019-01-09 17:49:45 +01:00
Wim Taymans
8fa6126599 rtkit: improve DISABLE_RTKIT
DISABLE_RTKIT should not even try to get the dbus connection or
anything.
2019-01-09 11:24:48 +01:00
Wim Taymans
714178b1e4 meson: add module dir directory for tests 2019-01-09 10:54:56 +01:00
Wim Taymans
69b7c18718 tests: add more tests 2019-01-09 10:48:18 +01:00
Wim Taymans
23c439fd66 meson: set spa plugin dir 2019-01-08 17:56:20 +01:00
Wim Taymans
b5a7891ee1 tests: add more tests 2019-01-08 17:38:34 +01:00
Wim Taymans
1ed27a8f2b add _GNU_SOURCE as compiler flag 2019-01-08 17:36:58 +01:00
Wim Taymans
57e0a94163 add const to info changes 2019-01-08 17:34:32 +01:00
Wim Taymans
979d155382 core: add user_data to core 2019-01-08 17:32:37 +01:00
Wim Taymans
fb5ae6df43 tests: add array test 2019-01-08 13:40:41 +01:00
Wim Taymans
e23deae087 meson: install permission.h header 2019-01-08 13:00:48 +01:00
Wim Taymans
2c571cddf5 tests: add c++ include test 2019-01-08 13:00:24 +01:00
Wim Taymans
d12148cfba graph: remove scheduler2
Move graph code into graph.h
2019-01-08 11:56:44 +01:00
Wim Taymans
b0f4be5fbc fix more compile errors
Avoid void * arithmetic
Do explicit casts to target type to make c++ happy
2019-01-08 11:53:36 +01:00
Wim Taymans
5b7ddb0105 buffer: remove buffer id
The buffer id is not needed/used, we use the index of the buffer in the
buffer array when configuring the port.
2019-01-07 17:57:03 +01:00
Wim Taymans
e918f9f77c fix sign confusion 2019-01-07 15:52:42 +01:00
Wim Taymans
74e5f9fbcf fix function types 2019-01-07 15:48:06 +01:00
Wim Taymans
098b80aa0c protocol: pass state as id 2019-01-07 15:39:59 +01:00
Wim Taymans
de796d34ad pod: handle pod copy failure
Don't check NULL in pw_spa_pod_copy so that we can check for allocation
failures when the functions returns NULL.
2019-01-07 15:36:19 +01:00
Wim Taymans
7cd55c2c6b fix switch fallthrough cases 2019-01-07 15:11:34 +01:00
Wim Taymans
9573b24e52 cpu: add force cpu flags
Use PIPEWIRE_CPU to force cpu flags.
2019-01-07 15:02:18 +01:00
Wim Taymans
1ca7704d64 type-info: fully initialize structs 2019-01-07 13:56:08 +01:00
Jan Grulich
238be61364 Avoid invalid conversion error with C++ compilators 2019-01-03 11:13:08 +01:00