Commit graph

1341 commits

Author SHA1 Message Date
George Kiagiadakis
863c2d496a meson: bump glib requirement to 2.62 as we are already using 2.62 API 2021-06-15 12:04:08 +03:00
George Kiagiadakis
6c592f3322 meson: add glib version required/allowed checks 2021-06-15 12:00:43 +03:00
George Kiagiadakis
4af7e2bd68 release 0.4.0 2021-06-10 19:42:04 +03:00
George Kiagiadakis
950c358180 create-item: handle all kinds of Audio/Video & Stream nodes
And be careful not to handle nodes created by si-audio-endpoint,
by using a specific property for that.

Also, use Audio/{Source,Sink}/Virtual as the media class of null sinks
created by si-audio-endpoint, it sounds more appropriate.

Fixes #34
2021-06-10 16:41:01 +03:00
George Kiagiadakis
558ab50367 si-standard-link: treat endpoints as devices when linking stream<->endpoint
This avoids reconfiguring endpoint nodes when re-linking streams
to their endpoint after having been corked by the policy.

This is not ideal, the logic here needs some refinement.
2021-06-10 14:53:09 +03:00
George Kiagiadakis
cead4dffb8 config: document the duck.level policy property 2021-06-10 14:53:09 +03:00
George Kiagiadakis
4cdfeb9c32 scripts: change debug level for some messages 2021-06-10 14:53:08 +03:00
George Kiagiadakis
2668900e18 lua: improve the object:activate() callback to report errors
There is now a second param to the callback that is an error string,
if any error happened
2021-06-10 14:53:08 +03:00
George Kiagiadakis
801ac7aa1a wplua: add a wplua_checkclosure() helper function 2021-06-10 14:53:08 +03:00
George Kiagiadakis
b6a5750595 Revert "tests: enable G_SLICE=debug-blocks in all tests"
This breaks the valgrind test setup, as this G_SLICE overrides
G_SLICE=always-malloc from valgrind_env

This reverts commit a0d0069f18.
2021-06-10 14:52:30 +03:00
George Kiagiadakis
606a9765d6 meson: add '--keep-debuginfo=yes' to the valgrind command line
ensures that we get debug symbols from modules printed correctly
2021-06-09 15:43:08 +03:00
George Kiagiadakis
7355215cf1 pipewire-object: change params-changed signal to take a string param name
To be consistent with the rest of the API where strings are used
to identify param types
2021-06-09 13:29:34 +03:00
George Kiagiadakis
a0d0069f18 tests: enable G_SLICE=debug-blocks in all tests
This can catch allocation mistakes in the g_slice allocator
2021-06-09 12:21:56 +03:00
George Kiagiadakis
82c054f1bd meson: use environment() objects to define env for tests
it's just a nicer syntax
2021-06-09 12:03:14 +03:00
George Kiagiadakis
b39514a455 meson: add a test setup to run tests under valgrind 2021-06-09 11:55:07 +03:00
George Kiagiadakis
86fde56ddd daemon/wpexec: standardize exit codes based on sysexits.h 2021-06-08 20:39:36 +03:00
George Kiagiadakis
5ef8faa730 daemon: replace the exit_message with direct message printouts
and use fprintf() for fatal errors, to make sure they are shown
2021-06-08 20:39:36 +03:00
George Kiagiadakis
aa618e99cb wpexec: force the log level to be at least 1 and use fprintf() for local errors
pipewire's client.conf sets the default log level to 0, which is not
good for wpexec, as lua runtime errors are reported as warnings currently.

Also, let's use fprintf() for local cli errors to make sure they get printed
even if the log level is 0
2021-06-08 20:39:36 +03:00
George Kiagiadakis
31f56c7be5 daemon: exit with 0 both in case of a signal and in case of disconnection
systemd stops wireplumber with SIGTERM and this should exit gracefully.
if wireplumber is started by other means, it may just stop when pipewire
stops... that's also fine
2021-06-08 20:39:36 +03:00
Julian Bouzas
0f01c8b6da tests: si-standard-link: remove unneeded core syncs 2021-06-08 13:23:44 -04:00
Julian Bouzas
85a7f01cb6 tests: common: make sure no events are pending before destroying core 2021-06-08 13:23:39 -04:00
George Kiagiadakis
f9767d19a6 lib: add struct paddings to be able to maintain ABI compatibility
Aim for 8 pointers on each struct, wich exceptions:
- 12 pointers for already crowded/important ones
- 4 pointers for empty ones that are used for proxies; we are
  unlikely to add any virtual methods on these classes ever
2021-06-08 17:38:14 +03:00
George Kiagiadakis
72297e0909 docs: set breathe_default_members to get struct members to show up in the docs
Otherwise structs do not have any members shown by default.
This was accidentally removed in an older commit.
2021-06-08 17:14:54 +03:00
George Kiagiadakis
06c0e44609 docs: remove :project: annotations for breathe
there is a breathe_default_project in conf.py.in that sets this
2021-06-08 17:12:26 +03:00
Julian Bouzas
83e50396ee pw-object-mixin: ignore set param on already destroyed objects 2021-06-08 09:08:13 -04:00
Julian Bouzas
21e73141c6 proxy: destroy pw_proxy if bind_error is called 2021-06-08 09:08:13 -04:00
George Kiagiadakis
0a987ea367 restore-stream: implement storing/restoring of target.node metadata
Closes #33
2021-06-08 13:40:13 +03:00
George Kiagiadakis
892129bd08 lua: implement metadata:set() 2021-06-08 13:40:13 +03:00
George Kiagiadakis
77454243bc lua: fix refcounting of metadata iterator
wplua_push* takes a full ref
2021-06-08 13:40:13 +03:00
Julian Bouzas
7d28027f9b wplua: fix memleak when converting GVariant to Lua 2021-06-07 11:33:21 -04:00
Julian Bouzas
8ba6439dd4 m-default-nodes-api: free default nodes when disabling plugin 2021-06-07 11:33:21 -04:00
Julian Bouzas
464f1de641 m-default-nodes: free default nodes when disabling plugin 2021-06-07 11:33:21 -04:00
Julian Bouzas
fc8cc09654 global-proxy: fix leak when getting global properties 2021-06-07 11:33:21 -04:00
Julian Bouzas
a12c41aca1 spa-pod: check if pod is valid before _parser_can_collect
Spotted with clang-tidy, avoids possible segfault if pod is NULL.
2021-06-07 11:33:21 -04:00
George Kiagiadakis
80fad18e3d lua: remove hack around WpObjectInterest since we can _ref() it now 2021-06-07 18:01:49 +03:00
George Kiagiadakis
ac5c2ebbba object-interest: remove unused _copy() method
object-interest is now ref-counted, so we can use _ref()
2021-06-07 17:56:32 +03:00
George Kiagiadakis
12f9e621e1 default-routes: use a constraint to check if device.name is present 2021-06-07 17:47:42 +03:00
George Kiagiadakis
2af0641a8b default-routes: fix storing dev_info 2021-06-07 17:47:42 +03:00
George Kiagiadakis
2e56aeb44a scripts: initial restore-stream implementation
Related to #33
2021-06-07 17:47:42 +03:00
George Kiagiadakis
450deabb40 object-manager: small doc fix 2021-06-07 17:47:42 +03:00
George Kiagiadakis
1ca67abc66 object-manager: support declaring interest on all properties of globals
Until now, object manager could only match pw global properties on
pw global objects, because this is the only available properties set
at the time the registry creates the global.

With this change, the object manager will now bind the proxy
if the type and the pw global properties have matched and will wait
until the proxy is available with all of its properties and tries
the check again.
2021-06-07 17:47:42 +03:00
George Kiagiadakis
997bdb65cd object-interest: enrich _matches_full() to be able to check all constraints 2021-06-07 17:47:42 +03:00
Wim Taymans
342c3a7ea2 si-adapter: handle autoconnect property
When the autoconnect property is not available or false, we must
simply configure the stream in its default channel map and leave it
unconnected.

Fixes pw-cat -p --target=0 ..
2021-06-07 10:29:25 +02:00
Wim Taymans
72d8778e3f si-adapter: handle dont-remix streams
Don't-remix streams don't change their channel mapping based on
the device they connect to but are always configured with their
default channel mapping, just like devices.

This fixes the gnome-control-center channel test.

This patch also removes the 1 channel -> many patch because it is
not the right thing to do in this case and should be implemented
with some proper channel mapping patch later.
2021-06-07 09:56:54 +02:00
George Kiagiadakis
f91653dbfe tests: store temporary WpState files in the build directory
or else the .config sub-directory stays in the source directory
and clutters it
2021-06-04 18:36:19 +03:00
George Kiagiadakis
38f7483793 state: remove support for groups and propagate save errors
There is no real use for groups in our API. Just use the name of
the file as the default group and be done with it...
Storing multiple groups with this API is problematic because it
forces flushing the file to disk multiple times, one for each group,
and it's just more performant if we use a prefix in the keys
to implement some form of logical separation.

This commit also makes the GKeyFile a temporary object. As we
always load the file from the file system in _load()
and we always replace its contents with a new dictionary in _save(),
there is no point in keeping the keyfile's internal data structures
stored in memory.

Save errors are now also propagated to adhere to the programming
practices of GObject
2021-06-04 18:36:19 +03:00
George Kiagiadakis
4948f6f2f6 state: don't stat() before creating the dir or removing the state file
there is no point
2021-06-04 18:36:19 +03:00
George Kiagiadakis
917cef25d8 policy: don't crash if some node properties are not set
- sanitize printing properties with tostring(), which will properly
  convert nil values to the string "nil"
- ensure some properties become empty strings if they are nil
2021-06-04 18:36:19 +03:00
Julian Bouzas
cde38daabf pipewire-object: fix memory leaks when getting properties 2021-06-03 14:53:00 -04:00
Julian Bouzas
1f65012abf m-default-profiles: finalize parent when plugin is destroyed 2021-06-03 14:53:00 -04:00