Wim Taymans
383df85466
modules: handle factory destroy
...
Listen for factory destroy and clean up the module.
See #565
2022-05-06 12:11:20 +02:00
Wim Taymans
1a911a9ccd
resource: allow NULL resource in error
...
And then log en error instead.
We can remove some awkward patterns in modules.
2022-02-02 21:33:33 +01:00
Wim Taymans
4e5ab4bcbe
context: pass quantum_limit when loading plugins
2022-01-12 17:47:58 +01:00
Barnabás Pőcze
2b110af366
treewide: meson.build: use dependency variable for SPA
...
Use `spa_dep` everywhere instead of `spa_inc`,
and remove `spa_inc` altogether.
2021-12-28 18:34:06 +01:00
Peter Hutterer
d8de1cb255
modules: switch to new property helpers
2021-10-13 07:12:00 +00:00
Peter Hutterer
14112fd168
modules: use the new topic-based logging from various pipewire modules
2021-09-28 09:35:39 +02:00
Wim Taymans
435de99428
Increase pod buffer size
...
The props of a 64 channel node are at least 2048 bytes long so make sure
we can build and filter them.
Fixes #1574
2021-09-06 15:09:28 +02:00
Peter Hutterer
da339c286f
meson.build: drop HAVE_CONFIG_H
...
This is an autotools leftover, with meson we're always guaranteed to have
the config.h file.
2021-06-10 09:04:16 +10:00
Peter Hutterer
0054319d88
meson.build: add -D_GNU_SOURCE to the project arguments
...
This appends it to every compilation command so we can get rid of the c_args
for (almost all) executables.
2021-06-09 07:47:51 +00:00
Peter Hutterer
71e0cfb5fa
pipewire: allow NULL pointers in pw_free_strv()
...
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
2021-06-02 10:56:46 +00:00
Peter Hutterer
e0471c6757
pipewire: allow NULL pointers in pw_properties_free()
...
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
Patch generated with concinelle with a few manual fixes.
2021-06-02 10:56:46 +00:00
Peter Hutterer
2405f0942b
spa/buffer: rename SPA_MEMBER to SPA_PTROFF
...
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
2021-05-06 09:39:39 +00:00
Wim Taymans
962d3b9127
modules: don't add CLIENT_ID when lingering
...
Because the object is not destroyed when the client is destroyed
and so the client.id might become invalid.
2021-04-23 11:19:25 +02:00
Wim Taymans
3005d33113
module-device-factory: clean up properties in all cases
2020-12-03 10:24:38 +01:00
Wim Taymans
e98931023f
device-factory: save factory_name for debug later
...
Make a copy of the factory_name, the properties it is inside are
destroyed when the device can't be created and we still need the
name for the debug message.
2020-12-03 10:16:38 +01:00
Wim Taymans
b8300c663b
improve some errors
...
Silence some -ENOENT warnings, they can happen when the object we
are introspecting is destroyed
2020-11-29 16:22:50 +01:00
Wim Taymans
1934df7307
pulse-server: implement OBJECT_LINGER
...
Use OBJECT_LINGER in module-load to make sure the module stays loaded
after the client disconnects.
Implement linger in adapter and node-factory
2020-11-26 09:28:22 +01:00
Wim Taymans
29d6179328
spa-device: cleanup in the free signal
...
Cleanup and close the plugin in the free signal so that the object
has a chance to remove the event handlers from the object.
2020-11-09 15:36:36 +01:00
Wim Taymans
f8186665d9
spa-node: remove unused factory_name
2020-11-09 15:35:12 +01:00
Wim Taymans
1570e62635
remove hooks from objects
...
Remove the hooks we installed on objects in the destroy/free event
or before calling _destroy. This is not really needed but it is
a nice thing to do because it calls the hook removed callbacks.
2020-11-06 15:53:32 +01:00
Wim Taymans
6317bc4deb
module-spa: remove the listeners correctly
...
In the module destroy, remove the module listener and in the
factory_destroy, the factory_listener.
2020-11-06 15:37:58 +01:00
Wim Taymans
91d4806611
permission: add some helpers
...
Add PW_PERM_ALL as a shortcut for all permissions
Add PW_PERMISSION_FORMAT and PW_PERMISSION_ARGS to nicely format
permissions.
2020-07-30 16:26:29 +02:00
Wim Taymans
e32a7a8d65
make some errors into debug
...
With the debug and return value we can delay writing error messages
in the log until we really need to.
2020-07-29 11:30:11 +02:00
Wim Taymans
591244c53e
module-device: remove useless assign
2020-07-02 10:58:35 +02:00
Wim Taymans
3df8139f4e
spa-node: unload handle in failure case
2020-07-02 10:57:10 +02:00
Wim Taymans
d871adbd4d
spa-device: fix leak of properties in error case
2020-07-02 10:52:15 +02:00
Wim Taymans
29282b8d50
module-device: remove impossible case
2020-06-23 15:26:04 +02:00
Wim Taymans
dac60d4e5b
avoid some leaks and NULL pointer derefs
2020-06-08 11:15:53 +02:00
George Kiagiadakis
17d7cdc80e
spa-node-factory: cleanup node when binding the client resource fails
2020-06-02 15:47:06 +00:00
George Kiagiadakis
16c1a7fe33
spa-device-factory: destroy device when the creator resource is destroyed
2020-06-02 15:47:06 +00:00
Wim Taymans
c2028a1695
Fix some leaks in error cases
2020-05-20 15:24:25 +02:00
Wim Taymans
9049f1fdbb
spa-node: don't warn on properties
...
When the node does not support enum_params or when the Props param
is not supported, suppress the warning.
2020-05-04 13:02:30 +02:00
Wim Taymans
aafd1e7298
improve debug
...
Improve log so that debug level 3 gives a reasonably readable overview
of what is going on.
2020-04-22 12:47:18 +02:00
Wim Taymans
65d72bb87c
improve error messages
...
Send create_object error messages to the new resource id so that
the client can better know what proxy is failing.
Use resource_remove when create_object fails because the core will
already send a remove_id on failure.
Try to send other errors to the proxy that made the request if
possible.
2020-02-25 16:38:13 +01:00
Wim Taymans
f9dccccf91
spa-node: fix properties while loading.
...
Update the example in the config file to load a spa node
2020-02-21 16:27:00 +01:00
Wim Taymans
df519ee3b3
avoid including private.h
...
Expose some more methods to make it possible to build without
including the private.h header, especially in modules.
2020-01-02 13:48:50 +01:00
Wim Taymans
f391353c7f
Make interface types a string
...
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
2019-12-19 13:36:04 +01:00
Wim Taymans
930b595724
pw_impl_node_new -> pw_context_create_node
2019-12-11 17:59:00 +01:00
Wim Taymans
6043a3f8c0
pw_impl_device_new -> pw_context_create_device
2019-12-11 17:56:24 +01:00
Wim Taymans
310077438b
pw_impl_factory_new -> pw_context_create_factory
2019-12-11 17:50:27 +01:00
Wim Taymans
beb3c69dfe
pw_node_proxy -> pw_node
2019-12-11 15:26:11 +01:00
Wim Taymans
f1eb5f6046
pw_device_proxy -> pw_device
2019-12-11 15:00:41 +01:00
Wim Taymans
898e870997
pw_node -> pw_impl_node
2019-12-11 12:41:45 +01:00
Wim Taymans
443a49947e
pw_module -> pw_impl_module
2019-12-11 11:57:56 +01:00
Wim Taymans
815d4a8d20
pw_factory -> pw_impl_factory
2019-12-11 11:45:27 +01:00
Wim Taymans
73900eea1b
pw_device -> pw_impl_device
2019-12-11 11:34:02 +01:00
Wim Taymans
95688939bf
pw_client -> pw_impl_client
2019-12-11 11:21:43 +01:00
Wim Taymans
d70a47b7fe
move proxy implementations in their own file
...
Rearrange headers
2019-12-11 10:58:51 +01:00
Wim Taymans
8ea78c2e3f
pw_core -> pw_context
...
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.
The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
2019-12-10 18:19:56 +01:00
Wim Taymans
e40fbf8cc4
Add printf checks for proxy_error and resource_error
...
Add an error variant without checks.
2019-11-21 16:09:05 +01:00