Commit graph

4355 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
451fee2208 pulse: implement some more extensions
Most just return nothing or say that the extension is not supported.
Remove some warnings, they should show up in the log from setting
the error in the context.
2020-08-17 17:40:34 +02:00
Wim Taymans
62cea9c6d5 pulse: implement some more methods
Makes paman work
2020-08-17 17:22:14 +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
03f1dfcf99 acp: handle unset profile
The active profile is set to -1 initially, don't try to do anything
with the profile if it is invalid.

See rhbz#1868332
2020-08-17 11:33:17 +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
dadb3a884d profile: refactor code to make EnumProfile and Profile params
Use the same code to enumerate the profiles and the current profile,
this makes sure we have all info in the Profile param as well and
don't need to do a lookup in the EnumProfile.
2020-08-17 11:08:26 +02:00
Wim Taymans
90e12299f1 acp: add current profile in the route 2020-08-14 15:09:00 +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
ebc659330e pulse: also update ports after profiles
The ports have references to the profile info.
2020-08-13 16:58:40 +02:00
Wim Taymans
f058f86670 pulse: also update the profiles when the active one changes 2020-08-13 16:10:30 +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
Felix Yan
cc9c2caa90 Correct typos in README.md 2020-08-12 18:10:47 +00:00
Wim Taymans
4b42639541 metadata: only emit signal when metadata changed 2020-08-12 18:59:59 +02:00
Wim Taymans
36c10046da metadata: fix string compare 2020-08-12 18:58:48 +02:00
Wim Taymans
add30965e3 meson: rename uninstalled target to pw-uninstalled
It does not seem to work anymore with recent versions.
2020-08-12 17:36:41 +02:00
Wim Taymans
2176874687 doc: fix some spelling errors 2020-08-11 21:24:19 +02:00
Wim Taymans
82b0644e23 gst: rework device provider
Use the node and port info to enum formats when available.
Use simple resync after each operation, when nothing is pending,
loop over the results.
2020-08-11 17:34:23 +02:00
Wim Taymans
799fe7f90c gst: reset negotiated state before connect
Right before connecting, set ourselves to not negotiated.
First look for errors, then the negotiated state.
Handle NULL caps after negotiation.
2020-08-11 16:10:44 +02:00
Wim Taymans
47a6360112 gst: don't share memory
We can't allow to share our memory because it might disappear when
the server or source renegotiates.
2020-08-11 16:10:00 +02:00
Wim Taymans
cc044b0e08 jack: don't overwrite any PIPEWIRE_PROPS values 2020-08-11 12:12:37 +02:00
Wim Taymans
f73a0c97e3 jack: use empty area when get_buffer frames is 0
Client that call port_get_buffer with 0 frames get the empty scratch
buffer because we can't know the final output size.
2020-08-11 12:09:50 +02:00
Wim Taymans
753af7c7b3 jack: improve buffer size callbacks
Make sure we emit the buffer callback either from the calling thread
or from the thread_loop. Mark the callback as pending and don't call
the process function until the callback has been handled.
2020-08-11 11:11:00 +02:00
Wim Taymans
e62b59beb9 node: only set update flag when changed 2020-08-10 18:19:42 +02: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
a3350d44eb pw-cat: use metadata to tag default device 2020-08-10 17:45:45 +02:00
Wim Taymans
5e9091a285 node: add new NEED_CONFIGURE flag
Add a new node flag that is set when the node needs more configuration.
Don't try to Start nodes that have the NEED_CONFIGURE flag set.
Make audioadapter clear the NEED_CONFIGURE flag when it has the
PortConfig.

These changes now make it possible to run:

gst-launch-1.0 -v pipewiresrc path=51 stream-properties="props,node.group=1" ! audio/x-raw ! pipewiresink stream-properties="props,node.group=1"

The pipewiresink and pipewiresrc will be added to the same scheduling
group (1) and the devices they connect to will be slaved, even if they
are otherwise not linked.

Without the NEED_CONFIGURE flag, pipewiresink would be added to the
pipewiresrc group and would be started by the daemon before the
session manager has a chance to configure (and link) the node.

Fixes #4
2020-08-10 16:57:14 +02:00
Wim Taymans
db93135ff7 impl-node: recalc when node flag change 2020-08-10 16:48:42 +02:00
Wim Taymans
2362953931 audioadapter: update flags 2020-08-10 16:48:03 +02:00
Wim Taymans
fb76f484a9 remote-node: also send spa_flags 2020-08-10 16:45:44 +02:00
Wim Taymans
915fba1eee node: handle state change errors
Keep the last error around when it's actually an error
When we get the sync reply from the state change, check if we have
an error. Keep the node in SUSPENDED on error.
2020-08-10 15:23:09 +02:00
Wim Taymans
2c2bb381b3 link: refactor a little 2020-08-10 15:23:09 +02:00
Wim Taymans
374210c890 acp: add per device port list
Add the list of possible ports for a device.
Pass the allowed devices in the routes.
Store the active port in the device.

Fixes enumeration of ports on devices with UCM.
2020-08-10 14:25:03 +02:00
Wim Taymans
5d90fe26f3 stream: use PIPEWIRE_NODE env as target_id fallback 2020-08-07 16:19:06 +02:00
Wim Taymans
b89e07f8c0 stream: use PIPEWIRE_LATENCY env as fallback 2020-08-07 15:15:40 +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
a0777d7806 policy-node: only set peer when we actually linked something 2020-08-07 10:50:30 +02:00
Wim Taymans
cb3f1b51aa adapter: only become started on success 2020-08-07 10:49:52 +02:00