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
Julian Bouzas
f8cf723b19
si-adapter: take ownership of format argument
...
The wp_si_adapter_set_port_config API must take ownership of the param argument
as described by the documentation.
2021-06-03 14:53:00 -04:00
Julian Bouzas
214c7a444a
endpoint: free media_class when disposing WpImplEndpoint
2021-06-03 14:53:00 -04:00
Julian Bouzas
3fbcf05c9b
pipewire-object: take ownership of param argument
...
The wp_pipewire_object_set_param API must take ownership of the param argument
as described by the documentation.
2021-06-03 14:53:00 -04:00
George Kiagiadakis
47ed9bb527
monitors: sanitize device names like media-session does
2021-06-03 18:58:49 +03:00
Julian Bouzas
d28f1241cc
object: advance pending transitions if activation fails
2021-06-03 09:38:19 -04:00
George Kiagiadakis
d84d897b59
modules: remove the old m-default-routes
2021-06-03 16:33:32 +03:00
Julian Bouzas
22dbdea894
m-device-activation: don't set device routes
...
This is already done by module-default-routes
2021-06-03 16:32:12 +03:00
George Kiagiadakis
ee87161d29
default-routes: re-implement the default-routes module in lua
...
using the logic from the default-routes of pipewire-media-session
Fixes : #28 , #30
Related: !156
2021-06-03 16:26:28 +03:00
Jason Francis
d9cd0e4fdf
docs: Write gtk-doc comments for constant variables
2021-06-02 17:38:34 +00:00
Jason Francis
1b5df6096a
docs: include wp.h in gir sources
2021-06-02 17:38:34 +00:00
Jason Francis
ed8346e77d
docs: Add brief descriptions to all functions
...
This ensures all of these functions are picked up by g-ir-scanner.
2021-06-02 17:38:34 +00:00
Julian Bouzas
35c7196454
policy: destroy node if defined target was not found and reconnect is false
...
Avoids number of PulseAudio Volume Control nodes to keep growing each time a
new client node is linked.
2021-06-02 16:42:15 +00:00
Julian Bouzas
4a1ee67303
global-proxy: make sure registry is valid before requesting destroy
...
Avoids segfault when requesting destroy if core is disconnected
2021-06-02 16:42:15 +00:00
George Kiagiadakis
a604ac4c0c
lua: don't crash if an iterator is NULL
...
simply behave as if the iterator is valid and has no items in it
2021-06-02 19:38:51 +03:00
George Kiagiadakis
9db0e741cd
lua: allow the Log api to debug boxed objects (useful for pods)
2021-06-02 19:38:51 +03:00
George Kiagiadakis
132de309cb
lua: fix PipewireObject api: s/set_params/set_param/ and cleanup
2021-06-02 19:38:51 +03:00
George Kiagiadakis
53fdc14d5d
lua: add WpState bindings
2021-06-02 19:38:51 +03:00
Julian Bouzas
8698d4f43a
object: use weakref when advancing current transition
...
Fixes reference count leak when activating an object and transition fails
2021-06-01 13:46:52 -04:00