Commit graph

985 commits

Author SHA1 Message Date
Wim Taymans
85977634c1 client-node: only add props and params when mask is set 2020-10-09 16:30:00 +02:00
Wim Taymans
8b70a83c96 pulse-server: improve server registration
Take a list of addresses to listen on.
2020-10-09 13:31:22 +02:00
Wim Taymans
5b8a52cc78 pulse-server: cleanup servers 2020-10-09 13:31:22 +02:00
Wim Taymans
13dfa9d64b pulse-server: update volume and mute for record streams 2020-10-08 19:36:12 +02:00
Wim Taymans
680f8bc645 pulse-server: set more flags 2020-10-08 19:35:58 +02:00
Wim Taymans
71e3052a33 pulse-server: reuse the socket 2020-10-08 18:06:12 +02:00
Wim Taymans
d44fdabea1 pulse-server: send messges when killed and disconnected 2020-10-08 18:06:12 +02:00
Wim Taymans
fde36ac6c2 pulse-server: use at least MIN_SAMPLES of samples per buffer 2020-10-08 18:06:12 +02:00
Wim Taymans
d01586bfa5 pulse-server: support network connections 2020-10-08 18:06:11 +02:00
Wim Taymans
177e897a88 pulse-server: pass data with a ringbuffer
Implement the process function from the RT thread and use a ringbuffer
to pass samples around.
2020-10-08 18:06:11 +02:00
Wim Taymans
138e61138f pulse: resize message dynamically 2020-10-08 18:06:11 +02:00
Wim Taymans
f0102fd490 pulse: move pulse protocol to module 2020-10-08 18:06:11 +02:00
Wim Taymans
bcaf7cd722 adapter: remove redundant set_active call 2020-10-05 12:16:46 +02:00
Wim Taymans
e9fd38512e node: improve debug 2020-09-17 10:34:42 +02:00
Wim Taymans
eaa08e209f protocol-native: remove mainloop hook only once 2020-09-15 18:00:08 +02:00
Wim Taymans
1a2e783a6f protocol-native: keep client around while processing
When we process the messages of a client, keep the client around
because some callback might have disconnected and tried to free
us.
2020-09-15 13:54:50 +02:00
George Kiagiadakis
613824ab0b metadata: set bound id on the exporting resource 2020-08-31 15:57:52 +03:00
Wim Taymans
39513fb681 protocol-native: fix error reporting
Don't say that there is no runtime directory set when there is but
the server is not running.
Simplify things by first trying to connect to the user runtime directory
when set and then try the system directory. There is no need to manually
check the existance of the socket, connect wil that that and set the
appropriate error.
2020-08-21 11:15:24 +02:00
Jonas Holmberg
3e7609dcaf protocol: Add system runtime directory for clients
Add /run/pipewire to the list of runtime directories so that clients can
connect to the system service without specifying runtime directory.

If the otherwise chosen directory (e.g. the user home directory) doesn't
contain any socket but /run/pipewire does, the latter will be used.
2020-08-19 17:46:50 +00:00
Wim Taymans
35534baf9d remote-node: clear up mix structures when port is removed 2020-08-19 11:23:16 +02:00
Emmanuel Gil Peyrot
14fdf07e8f Run codespell on the entire codebase
This tool detects and fixes common English spelling mistakes, with
generally very few mistakes.

Here is the command I used to generate this commit.  There were a few
changes that had to be done manually, and of course adding the ignore
file:
```shell
codespell -I .codespell-ignore -x .codespell-ignore -w
```

I didn’t add it to the CI, but this would be a good place for it.
2020-08-17 17:16:31 +00:00
Wim Taymans
0955ecc4b0 client-node: avoid useless warnings
Mostly useless warnings while shutting down.
2020-08-10 18:15:14 +02:00
Wim Taymans
fb76f484a9 remote-node: also send spa_flags 2020-08-10 16:45:44 +02:00
Wim Taymans
5fda46fdb9 remote-node: activate node after init
Activate the node after we successfully created a proxy and
initialized it.
2020-08-07 11:52:35 +02:00
Wim Taymans
e5f85d6a4c remote-node: clean node on error 2020-08-07 11:52:14 +02:00
Wim Taymans
f4e8ebab51 improve debug and error messages 2020-08-07 10:47:18 +02:00
Wim Taymans
8b2617227a client-node: improve debug 2020-08-06 17:59:58 +02:00
Wim Taymans
8a9bb9dabb Use fcnt F_DUPFD_CLOEXEC to dup an fd
Closes #38
2020-08-06 11:08:20 +02:00
Wim Taymans
469dff0153 use global_update_keys
First set the properties in the object itself and then copy them
over to the global. This ensure that the global properties are
also in the object and makes code a bit cleaner.

It also make it possible to use the global id to make the property
values unique, if we want to later .
2020-08-05 12:55:33 +02:00
Wim Taymans
d57da19f26 client-device: first set implementation, then register
Setting the implementation updates the properties so that we
have more info when creating the global.
2020-08-03 18:11:12 +02:00
Wim Taymans
6f2e274b15 protocol: add a few more options for XDG_RUNTIME_DIR
PIPEWIRE_CORE can be used to specify a server name.
PIPEWIRE_REMOTE can be used to specify what server name to
connect to.

Either use the absolute path of the name to create and connect
to a server, or use a relative path. For a relative path, the
server name will be completed by prefixing the following paths
in order:

PIPEWIRE_RUNTIME_DIR environment variable,
XDG_RUNTIME_DIR environment variable,
HOME environment variable,
USERPROFILE environment variable,
home directory as stored in the password database.

Fixes #259
2020-07-31 12:46:58 +02: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
8db9a2741b metadata: only allow setting metadata on objects we can see
Allow a client to only set metadata on objects that it has
read access to.
2020-07-30 15:30:13 +02:00
Wim Taymans
a5ec68e61c metadata: only set default name when not already set 2020-07-30 14:28:11 +02:00
Wim Taymans
ba8522aac9 metadata: we need W permission to set and clear properties 2020-07-30 14:27:35 +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
6530c694c9 protocol: debug server we connect to 2020-07-23 20:12:25 +02:00
Wim Taymans
141238d88b core: always use explicitly configured properties first
First use the configured properties, then use the env variables.
Make the daemon use the env variable by default.

This makes it possible to start servers with PIPEWIRE_CORE env variable
names but still override with the command option.

Makes it possible to make apps connect to PIPEWIRE_REMOTE env by
default and allows you to override with the command option.
2020-07-23 13:40:02 +02:00
Wim Taymans
553337df60 remote-node: handle remove port 2020-07-22 16:20:43 +02:00
Wim Taymans
2bb1d88fbe keys: let env variables overwrite the keys 2020-07-22 11:25:19 +02:00
Wim Taymans
07cc07597c access: always put access in property
Improve debug
2020-07-17 16:47:14 +02:00
Wim Taymans
5731447357 add portal module again
This access module now only checks if the connection is comming
from the portal and tags the ACCESS property with portal in that
case. It will no longer do permission store checks, that's for
the session manager.
2020-07-17 14:12:10 +02:00
Wim Taymans
89b189d190 access: don't check access if already set
If we already have an access property, leave the client as is.
2020-07-17 13:23:50 +02:00
Wim Taymans
f2c1ab6069 access: make access property configurable
Just set the value of access.force into pipewire.access so that
the session manager can deal with it.
2020-07-17 09:59:49 +02:00
Wim Taymans
33d7b6ea43 Remove old portal module from build 2020-07-16 17:56:21 +02:00
Wim Taymans
a295901329 Move portal module to session manager 2020-07-16 17:54:18 +02:00
Wim Taymans
7d56b78bce remove some unused fields 2020-07-16 17:47:30 +02:00
Wim Taymans
5afdd507c3 access: document and improve arguments
Add option to force flatpak security
When a check is inconclusive, go to the next check instead.
2020-07-16 11:45:44 +02:00
Wim Taymans
031a8ea799 client-node: also unref the activation memblock 2020-07-10 16:11:16 +02:00
Wim Taymans
e58fcb95d0 client-node: remove the tag from the right pool 2020-07-10 16:10:45 +02:00