Commit graph

1405 commits

Author SHA1 Message Date
Julian Bouzas
2792cecbcf properties: use a boxed WpPropertiesItem type when iterating
Needed for JavaScript bindings
2021-07-15 08:55:00 -04:00
Niklāvs Koļesņikovs
cb41ecc6c6 meson.build: adds summary() about Lua implementation used 2021-07-14 14:27:04 +00:00
Peter Hutterer
be1a077eaf state: store our WpState files in $XDG_STATE_HOME/wireplumber 2021-07-14 14:44:11 +10:00
Peter Hutterer
ab62af1748 lib: add a function to get the xdg state dir
Added recently to the XDG spec, XDG_STATE_HOME ($HOME/.local/state/) is for
files that are neither configuration/data files nor runtime/cache files.
2021-07-14 13:18:49 +10:00
Peter Hutterer
fd37c0cd2e meson.build: let meson handle the prefix + bindir concatination
For bindir, libdir and datadir, meson enforces that either
- the value is an absolute path that is a subdir of $prefix
- the value is a relative path that is then made a subdir of $prefix

Example meson error message:
ERROR: The value of the 'bindir' option is '/usr/foobar' which must be a subdir of the prefix '/usr/local'.
Note that if you pass a relative path, it is assumed to be a subdir of prefix.

And meson handles absolute paths for those directories correctly (ignoring
$prefix), so we don't need to manually compose those.

Only exception is sysconfdir which may be outside the prefix but there too
meson handles an absolute path correctly.
2021-07-06 09:40:39 +10:00
Niklāvs Koļesņikovs
d8365fe33e
meson: adds summary() to auto features 2021-07-05 12:30:49 +03:00
George Kiagiadakis
6ef84a1309 docs: document the lua ObjectManager / Interest / Constraint APIs 2021-07-02 20:24:25 +03:00
George Kiagiadakis
ec397aaaca lua: add not-equals to the possible constraint verbs 2021-07-02 20:24:25 +03:00
Julian Bouzas
0c51cf9a7b session-item: fix reference leak when getting properties 2021-07-02 11:59:42 -04:00
George Kiagiadakis
6e6852b391 tests: create wpipc tests sockets also in /tmp with a random name
See #39, #16
2021-07-02 16:34:31 +03:00
George Kiagiadakis
655898e61f tests: run with PIPEWIRE_RUNTIME_DIR=/tmp
... and hope for the best, because sockets apparently can't
have more than 108 characters in their path

See #39, #16
2021-07-02 16:34:28 +03:00
Julian Bouzas
2900dc1c23 object-manager: remove old global when exposing new global with same id
Sometimes, especially when running the wireplumber daemon with valgrind, a new
global with the same Id as another old global owned by a proxy wants to be
exposed before the old proxy is destroyed. If this happens, instead of returning
with an assertion error, we remove the old global and we export the new one.
2021-07-01 14:49:28 -04:00
Julian Bouzas
4275d91675 global-proxy: add extra checks to make sure binding is successful
Globals can be removed by the object manager when their associated proxy is
currently being bound. Adding extra checks in wp_global_proxy_bin() to return
a transition error avoids binding the proxy when that happens.
2021-07-01 14:37:42 -04:00
Julian Bouzas
dc6fa6cbfe m-lua-scripting: unref value pod after adding it to control 2021-06-30 14:06:48 -04:00
George Kiagiadakis
888d6e5033 lua: add Port.get_direction() + documentation for it 2021-06-30 19:51:21 +03:00
George Kiagiadakis
532340cc8f docs: mention the new matrix room in the community resources 2021-06-30 19:51:21 +03:00
George Kiagiadakis
068f7f3000 docs: complete lua Node api docs and fix some ref links 2021-06-30 19:51:21 +03:00
George Kiagiadakis
18fe17fa01 lua: fail if an optional Interest is not none, nil, Interest or table 2021-06-30 19:51:21 +03:00
George Kiagiadakis
795a37d029 lua: complete the WpNode bindings 2021-06-30 19:51:21 +03:00
George Kiagiadakis
7fedb5e9e1 wplua: expose functions to convert enums to strings for lua and vice versa 2021-06-30 19:51:21 +03:00
Julian Bouzas
ee190411f4 state: escape invalid key file characters 2021-06-30 08:48:57 -04:00
Julian Bouzas
8505078a80 tests: endpoint: fix coverity 'side effect in assertion' error 2021-06-30 08:44:35 -04:00
George Kiagiadakis
d576fde2d7 tests: set PIPEWIRE_RUNTIME_DIR and stop using XDG_RUNTIME_DIR
Using XDG_RUNTIME_DIR is problematic in test-reserve-device
because GTestDBus also exports XDG_RUNTIME_DIR and then unsets it,
which makes pipewire end up using $HOME for its socket.
Using PIPEWIRE_RUNTIME_DIR is safer, as this variable is only used
by pipewire.

Also use the build directory as a runtime dir (it always exists and
nothing is going to interfere with it) and unset XDG_RUNTIME_DIR from
the CI scripts, since nothing else is using it.

Closes #39
2021-06-30 11:53:21 +03:00
George Kiagiadakis
b741b2c8c8 release 0.4.1 2021-06-29 13:27:19 +03:00
George Kiagiadakis
b52e945cb6 ci: enable testing of wpipc 2021-06-28 20:37:34 +03:00
Julian Bouzas
85820f7aef tests: examples: print error if buffer is not valid in wpipc-client
If we lose connection with the server while a request was pending, the request
callback is still triggered but with NULL buffer.
2021-06-28 11:38:38 -04:00
Julian Bouzas
9fd76570c4 tests: wpipc: check if new connection to new receiver is valid after losing connection 2021-06-28 11:38:37 -04:00
Julian Bouzas
6b8ea83404 wpipc: sender: disconnect and clear all pending tasks if connection was lost
If we don't remove the socket from epoll when the connection is lost, we risk
having the lost callback triggered more than once by epoll, creating race
condition in the unit test because more than 1 event happened. The epoll thread
and socket will be re-created again when re-connecting.

Note that we cannot destroy the epoll thread before triggering the lost
connection callback because we are running the callback in the epoll thread,
which is why removing the socket from epoll is the only way to make sure the
lost connection callback is only triggered once.
2021-06-28 11:38:37 -04:00
Julian Bouzas
313f872570 wpipc: receiver: also emit sender disconnected when failed to read 2021-06-28 11:38:37 -04:00
Julian Bouzas
f4a4f8bcc7 wpipc: protocol: make sure buffer is initialized to 0 before building reply/request
Fixes valgrind errors
2021-06-28 11:38:37 -04:00
Julian Bouzas
8a5a8fc015 wpipc: change epoll thread func type name to be more consistent 2021-06-28 11:38:37 -04:00
Julian Bouzas
ac4d5bd22a tests: wpipc: use GCond instead of while loop to wait for events
Fixes hanging issues when running test with valgrind.
2021-06-28 11:38:37 -04:00
Julian Bouzas
d0b26fd70f tests: wpipc: fix typo in sender-receiver unit test 2021-06-28 11:38:37 -04:00
George Kiagiadakis
9dabe3d991 ci: add ubuntu 20.04 builds and test some more option combinations
- on fedora: with and without docs
- on ubuntu: with and without introspection
- on fedora: with lua 5.4 from the submodule
- on ubuntu: with lua 5.3 from the system
2021-06-28 17:54:38 +03:00
George Kiagiadakis
2bd0c1b687 docs: relax doxygen version requirement
1.8.x also works just fine
2021-06-28 17:36:47 +03:00
George Kiagiadakis
096337f7a5 meson: bump lua dependency to 5.4 and update the subproject 2021-06-27 07:57:06 +00:00
George Kiagiadakis
c41d042dd0 wplua: remove handling of LUA_ERRGCMM, which is removed in lua 5.4 2021-06-27 07:57:06 +00:00
Julian Bouzas
014ef05308 m-reserve-device: use a weak ref instead of raw pointer for transition
This always guarantees the transition is valid when g_weak_ref_get() does not
return NULL.
2021-06-25 11:04:30 -04:00
Julian Bouzas
f7483ebd3d tests: transition: make sure transition is still valid after advancing
Advancing a transition might free it, so we ref before advancing it, and unref
after checking its completion.
2021-06-25 11:04:15 -04:00
Julian Bouzas
70197f498c tests: fix coverity scan side effect in assertion issues 2021-06-25 08:50:08 -04:00
Julian Bouzas
5b4b360b1c wp: log warning if PIPEWIRE_DEBUG env variable could not be set 2021-06-25 08:50:08 -04:00
Julian Bouzas
a65f3bb44e m-default-nodes: properly parse args 2021-06-25 08:50:08 -04:00
Julian Bouzas
f0830e5a7d m-lua-scripting: check return values of lua_getstack and lua_getinfo 2021-06-25 08:50:08 -04:00
Julian Bouzas
51128f0521 m-mixer-api: only add 'mute' if correctly parsed 2021-06-25 08:50:08 -04:00
Julian Bouzas
412fae485a m-lua-scripting: make sure pod is successfully parsed
Otherwise show a warning
2021-06-25 08:50:08 -04:00
Julian Bouzas
671b8110d9 m-lua-scripting: make sure lua type is valid 2021-06-25 08:50:08 -04:00
Julian Bouzas
c423012238 m-lua-scripting: fix conversion from SPA_TYPE_Bytes to LUA_TNUMBER 2021-06-25 08:50:08 -04:00
Julian Bouzas
02fd0a554a m-si-standard-link: make link_all a parameter
Otherwise its value will always be false, making it useless
2021-06-25 08:50:08 -04:00
George Kiagiadakis
c6d104a66b access-portal: fix granting access to camera device nodes
The constraint for nodes wasn't supposed to have a client.id
Also make the nodes_om global, to avoid leaking it in potential ref loops
2021-06-25 11:47:13 +03:00
Julian Bouzas
892b0dada6 lib: Use #define instead of 'static const' for constants
Fixes build errors when using GCC older than v8.1
2021-06-24 09:24:16 -04:00