Commit graph

774 commits

Author SHA1 Message Date
Wim Taymans
3174e8b69e media-session: fix spelling mistake 2020-08-17 19:30:26 +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
688a1ab082 media-session: add module to restore stream settings 2020-08-17 17:55:20 +02:00
Wim Taymans
6b7928aee5 media-session: only debug param when loglevel set 2020-08-17 17:52:25 +02:00
Wim Taymans
28bb212630 policy-node: improve move
Don't try to do work when not needed
2020-08-17 17:50:42 +02:00
Wim Taymans
f9a5053c73 media-session: improve cleanup in some modules 2020-08-17 17:50:15 +02:00
Wim Taymans
e544f82004 Revert "default-profile: keep a restore and save list"
This reverts commit de71618b99.

Doesn't work when the device is removed and added again.
2020-08-17 16:04:22 +02:00
Wim Taymans
d337abf690 media-session: escape and unescape keys when saving
So that we can allow space in the keys.
2020-08-17 12:12:11 +02:00
Wim Taymans
de71618b99 default-profile: keep a restore and save list
Load the settings into the restore list, when we see a device and it's
in the restore list, restore the profile and remove from restore list.
All updates to profiles go into the save list and it is then saved.
2020-08-17 11:48:52 +02:00
Wim Taymans
48a7e83fab media-session: add module to restore route volumes 2020-08-17 11:17:21 +02:00
Wim Taymans
31a3fab554 media-session: use name from Profile param 2020-08-17 11:15:44 +02:00
Wim Taymans
05416b497c media-session: improve property save/load
Allow spaces in the property values.
2020-08-17 11:10:16 +02:00
Wim Taymans
4ad6c627a0 media-session: add module to restore card profile
Save card profiles to file and restore.
2020-08-13 17:01:47 +02:00
Wim Taymans
cf6ffcacb8 media-session: do some more cleanup 2020-08-13 17:00:08 +02:00
Wim Taymans
efdeceddab media-session: Add module to load/save default nodes
Nodes are stored with their (unique) name and restored with their
ID on the metadata.
2020-08-13 11:33:48 +02:00
Wim Taymans
8a4dd83883 media-session: add API to load/store state 2020-08-13 11:33:48 +02:00
Wim Taymans
4b42639541 metadata: only emit signal when metadata changed 2020-08-12 18:59:59 +02:00
Wim Taymans
a0777d7806 policy-node: only set peer when we actually linked something 2020-08-07 10:50:30 +02:00
Wim Taymans
46b8b67ee6 policy-node: small cleanup
to keep the orinal node around if we want to do something with it
later
2020-08-06 17:58:42 +02:00
Wim Taymans
7cdef8aa32 media-session: improve debug 2020-08-06 17:11:35 +02:00
Wim Taymans
e71936f870 Improve naming
master -> driving
priority_master -> priority_driver
segment_master -> segment_owner
2020-08-06 13:49:33 +02:00
Wim Taymans
4b56574ce0 policy-node: don't fail on incomplete format
Use some defaults when parsing the audio format.
2020-08-06 12:51:20 +02:00
Wim Taymans
64067bafe3 media-session: remove listener 2020-08-04 13:46:22 +02:00
Wim Taymans
66816580bc alsa: improve configuration of NICK 2020-08-03 18:16:53 +02:00
Wim Taymans
79937676a4 alsa: add profile description in node description 2020-08-03 16:28:09 +02:00
Wim Taymans
f2cc0e6723 media-session: add some debug for enum-param 2020-07-31 15:21:39 +02:00
Wim Taymans
5bdd65e066 device: pass original seq in async reply
When we get an async reply from the implementer, use the original
seq from the caller in the reply.

Fixes !287
2020-07-31 15:19:45 +02:00
Wim Taymans
5e51cbe48e media-session: improve param enumeration
Don't use subscribe, enum is more manageable.
Use user data field to check for changes.
Only enumerate readable params.
Enum all node params.
2020-07-31 13:59:25 +02:00
Wim Taymans
6fd373ac83 examples: add support for YUV data 2020-07-31 11:44:20 +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
0d6bbaa7e1 policy-node: only configure devices when active
Wait until a node is active before we attempt to configure it or
else we don't yet have a format to configure it with.
2020-07-29 12:20:24 +02:00
Wim Taymans
a2de3b0873 policy-node: add default video source metadata 2020-07-28 11:17:36 +02:00
Wim Taymans
9e8851e0ae policy-node: do downmix in monitor streams
Monitor streams usually have 1 channel so ask for all monitored
channels to be downmixed.
Don't try to configure video or unknown streams
2020-07-28 10:50:00 +02:00
Wim Taymans
a96fcf5c19 policy-node: rework node configuration
Add a configure stage to the node where the PortConfig is
determined.
Wait until we link a stream and then configure the node with the
portconfig of the peer.
Configure devices with the their best portconfig by enumerating
the formats.
2020-07-28 10:21:01 +02:00
Wim Taymans
e35586cd15 media-session: link MONO/UNKNOWN channels only once
Try to only link the MONO and UNKNOWN input ports once
2020-07-27 17:41:52 +02:00
Wim Taymans
4a8afe389c policy-node: boost priority on default device
When we find a default device, boost the priority so that it
remains the target device even when a device with higher priority
is scanned later.

Fixes issue where default device was not selected because a higher
priority device was encountered after it.
2020-07-27 10:16:17 +02:00
Wim Taymans
34fc7ff529 media-session: link unknown and mono streams to something 2020-07-24 17:39:29 +02:00
Wim Taymans
266e1301d2 use id to store default sink/source
This is easier to handle in general and we should not use the name
as a unique id. If the session manager wants to save things, it can
use whatever fields it wants from the object to create a unique
persistent name.
2020-07-23 11:59:13 +02:00
Wim Taymans
193b9afdff media-session: always prefer a port match
First find a port match and then increase the score when the port
was unconnected.
2020-07-22 17:24:58 +02:00
Wim Taymans
201d762b2a policy-node: refactor configure_node 2020-07-22 16:53:02 +02:00
Wim Taymans
03c2185efe media-session: rework linking nodes
Rework how nodes are linked. score each port pair and link the
highest score taking into account the type, direction, channels,
and number of linked ports.
2020-07-22 15:05:45 +02:00
Wim Taymans
5f9a8a82ab media-session: improve find_object
Make it possible to search for a type
2020-07-22 14:14:02 +02:00
Wim Taymans
f6753eefc3 media-session: keep more info about ports
Parse the DSP type and the channel and keep it around
2020-07-22 11:27:23 +02:00
Wim Taymans
7bd7476426 media-session: use ACP alsa devices by default 2020-07-20 17:34:28 +02:00
Wim Taymans
8c4b594b50 policy-node: don't move to the current target 2020-07-20 14:46:44 +02:00
Wim Taymans
7915bf5778 policy-node: implement move node
Move nodes to a new target when the metadata changes.
2020-07-20 14:40:50 +02:00
Wim Taymans
cd7763c814 access: use key to access property 2020-07-17 16:46:26 +02:00
Wim Taymans
119ef5e376 session-manager: move portal check back to pipewire
Enable the portal check in pipewire.
Only do permission store queries in the session-manager for portal
managed apps.
2020-07-17 14:14:26 +02:00
Wim Taymans
a295901329 Move portal module to session manager 2020-07-16 17:54:18 +02:00
Wim Taymans
d720724d48 media-session: add method to iterate objects 2020-07-16 17:48:29 +02:00