Commit graph

1311 commits

Author SHA1 Message Date
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
Julian Bouzas
efb0f83d1f object: use destroy notify to keep self alive while advancing transitions 2021-06-01 13:43:25 -04:00
George Kiagiadakis
ec7541e840 docs: make progress on lua api documentation 2021-05-28 19:22:56 +03:00
George Kiagiadakis
7c8b91c94e policy-{node,endpoint-client}: do not crash if media.class is nil 2021-05-28 18:44:11 +03:00
George Kiagiadakis
f038666399 meson: add reference to bugfix
so that we can safely remove our hack in the future, when we
will be able to depend on the next version of meson
2021-05-28 17:42:16 +03:00
George Kiagiadakis
94dd3c4c1c config: disable role-based endpoints in the default configuration 2021-05-28 17:36:57 +03:00
George Kiagiadakis
ae99e50182 tests: si-audio-adapter: test is.device property 2021-05-27 17:01:55 +03:00
George Kiagiadakis
bf9d4c4ed7 m-si-standard-link: fix number of links check
self->node_links is a GPtrArray*
2021-05-27 17:01:00 +03:00
George Kiagiadakis
b5ad7b3996 tests: si-standard-link: fix racy test
- use si-audio-adapter, to keep the original test's spirit
  of linking two terminal nodes, not two intermediate ones
- setup null sink to be a virtual device sink with 2 channels
  and the audiotestsrc to be a stream, so that it is also configured
  to have 2 channels via si-standard-link's logic
- don't use a second client core, as it introduces races;
  we don't need that anymore because we don't export endpoint-links
2021-05-27 16:55:26 +03:00
George Kiagiadakis
bfbe97c8b3 meson: force the gir target to depend on wp-gtkdoc.h
With a hacky workaround, because the generate_gir() implementation
has a bug and does not pass the file dependencies properly down
to the custom_target() that it creates internally
2021-05-26 21:22:24 +03:00
George Kiagiadakis
5d7cdfabec docs: tidy up most documents and try to update the information in them
- use code blocks properly
- use note/important blocks
- stop using ` for emphasis, use `` or * appropriately
- update info on contributing, community, running, logging
2021-05-26 19:20:05 +03:00
George Kiagiadakis
f2d4ed17da docs: use the default sidebar color to make the version easier to read 2021-05-26 15:59:41 +03:00
George Kiagiadakis
fa6db589da docs: show version number on the sidebar 2021-05-26 15:58:40 +03:00