Commit graph

3472 commits

Author SHA1 Message Date
Wim Taymans
d99ac615b2 conf: remove extra object level
We can parse this without the extra object level.
Use 4 spaces per level
2020-12-31 21:45:36 +01:00
Wim Taymans
d3f314cf82 media-session: remove -p option
Place properties in the config file now.
2020-12-31 21:25:38 +01:00
Wim Taymans
d09cb1f05b json: handle incomplete strings
If we run to the end of the string and the string is not closed,
assume it closed.
2020-12-31 17:16:32 +01:00
Wim Taymans
799bc13c85 json: set state on final bare string
When we run out of chars and are inside a bare string, set our state
so that the next round will continue instead of looping forever.
2020-12-31 17:07:03 +01:00
Wim Taymans
49d11acde0 daemon: rework config parsing
Replace config parsing for something more flexible based on json.
2020-12-31 16:44:35 +01:00
Wim Taymans
1bd90dc666 pipewire-pulse: escape the address string
It can contain special chars
2020-12-31 16:24:26 +01:00
Wim Taymans
0bf1aa8f45 media-session: load properties from config 2020-12-31 13:06:17 +01:00
Wim Taymans
85306917a2 media-session: try to load config from state dir first
First try to load conf from the user config directory and then from
the global config dir. Allows users to copy and modify a custom
config file.
2020-12-31 11:46:54 +01:00
Wim Taymans
20e9ec25be media-session: use simplified syntax
Now sure about this, it looks better but it's less compatible.
2020-12-31 10:19:48 +01:00
Wim Taymans
2fd35488c7 properties: just use the parser in all cases
We can just use the json parser to parse the old key=val
syntax as well now.
2020-12-31 10:12:09 +01:00
Wim Taymans
f29bc42b4d media-session: improve conf parsing
Just use parse_string to convert the value.
2020-12-31 10:11:10 +01:00
Wim Taymans
24c68b0067 media-session: add config files
Remove -e and -d options
Manage modules in media-session.conf
Add alsa-monitor.conf that can match node/device properties with
a regex and update properties on it. All previous configuration and
more cane be done with this.
2020-12-30 13:15:08 +01:00
Wim Taymans
cb8e627b1e media-session: use new properties method to load state 2020-12-29 13:30:04 +01:00
Wim Taymans
923e82df27 properties: Expose _update_string() method
Refactor an internal method and expose as _update_string() to
update an existing properties structure with a string representation.
2020-12-29 13:15:54 +01:00
Georges Basile Stavracas Neto
56e2d6a3da filter, stream: Fix error check for DMA-BUF buffers
When a buffer is of type SPA_DATA_DmaBuf, the 'data' field
will be NULL - we instead have to check if the file descriptor
is valid. The current code, however, always checks if the
data is NULL, which gives a false positive for DMA-BUF buffers,
signaling an error when there is none.

Fix that by also checking if the buffer type is MemPtr together
with the NULL check of the 'data' field.
2020-12-28 15:58:38 -03:00
Ihor Kalnytskyi
8942f6b402 launch: avoid autostarting pipewire-pulse systemd units for root
Long story short, this is something pulseaudio has since 2017 [1]. If
pipewire-pulse is aiming to be a drop-in replacement, the same behaviour
is probably expected.

I noticed that without this line I hit some issues with systemd socket
activation. In fact, it does not work properly at all. It probably has
something to do with the fact that pipewire-pulse is started for GDM
session and is somehow propagated down to my own user session.

[1] 24928d6b6f
2020-12-28 13:35:41 +01:00
Gabriel Ebner
ad9d485d1b gst: set node.name and node.description based on client-name property 2020-12-26 10:11:42 +01:00
Wim Taymans
921aba9edf media-session: fix help
Use enabled and disabled options from the implementation so that we
can parse them in help.
2020-12-25 19:47:34 +01:00
Wim Taymans
f28fb692a4 pw-top: handle io 2020-12-25 16:35:38 +01:00
Wim Taymans
ae8f8b25f6 pw-top: add new tool
Uses ncurses to display all drivers and nodes with their latency,
error count and DSP usage.
2020-12-25 16:33:54 +01:00
Gabriel Ebner
7bdcfb6383 pw-cat: report delay 2020-12-23 19:13:29 +00:00
Wim Taymans
d7a2b569e4 alsa-monitor: make no-auto-port/profile instead
auto-port and auto-profile are enabled by default so make a no-auto
version to disable.
2020-12-22 13:12:12 +01:00
Wim Taymans
a8937413e6 acp: add options to disable profile and port switching
See #498
2020-12-22 13:08:14 +01:00
Pauli Virtanen
09265e116e media-session: accept multiple -p, -e, and -d command-line arguments
Combine arguments together if given multiple times, instead of using the
last one. Useful, since pipewire.conf appears to not do quotes.

Fixes !348
2020-12-22 12:47:34 +01:00
Wim Taymans
461e3db741 tests: fix some leaks
See #497
2020-12-21 20:07:02 +01:00
Wim Taymans
5804dd3f9b properties: fix leak with NULL or empty key
See #497
2020-12-21 19:48:55 +01:00
Wim Taymans
62954e14c3 node: improve profiler
Make a new complete event and use it instead of the start event
Use the start event at the start of the cycle
Make the profiler also log incomplete graph cycles
2020-12-20 20:37:21 +01:00
Wim Taymans
f630dd1a3b node: improve debug
Add duration/rate/position in warning
2020-12-20 20:37:21 +01:00
Wim Taymans
2d89ad8533 profiler: add xrun_count and latency to profiler 2020-12-20 12:32:54 +01:00
Wim Taymans
0370d7580f impl-node: save the original requested latency 2020-12-20 12:32:54 +01:00
Wim Taymans
c13183f182 impl-link: mark feedback links with property 2020-12-20 12:32:54 +01:00
Wim Taymans
34c33ccdbf policy-node: clear target node for dont-reconnect streams
When a stream is marked don't reconnect, clear the target-node so that
it does not accidentally gets linked to a save target. This makes it
kill the monitor stream from pavucontrol after a client disconnects.
2020-12-20 12:32:54 +01:00
Wim Taymans
7ef15f3721 pw-dump: convert unknown ids to id-<hexnum> 2020-12-18 17:54:40 +01:00
Wim Taymans
abe12cf790 pw-dump: improve choice values
Place range and step values on a single line
2020-12-18 17:49:46 +01:00
Wim Taymans
f7a7feea4e pipewire-pulse: use defines for our keys 2020-12-18 17:19:24 +01:00
Wim Taymans
bcceff4ab0 module-access: update with checks for fuse like upstream xdp 2020-12-18 15:48:13 +01:00
Wim Taymans
5ea1fd3e7d impl-link: fix dependencies for feedback links
A feedback link is scheduled as a dependency from input to output
node. Make sure we also notify the client of this dependency.

Fixes #404
2020-12-18 13:10:08 +01:00
Wim Taymans
2bd5dac306 media-session: create seq-bridge after we have permissions
See #423
2020-12-18 12:04:49 +01:00
Wim Taymans
d2a5f5c1ae pulse-server: also cleanup sample when error
Remove the separate error event and merge with the done event with
error code. This then also marks the sample as done when in error
so that it gets cleaned up properly.

Fixes #486
2020-12-18 09:50:12 +01:00
Wim Taymans
1a690a0cbb pulse-server: limit writes to ringbuffer
We can't write more to the ringbuffer than its maxsize. Some clients
send more than the negotiated maxsize and cause a crash if we don't
clamp.

See #440
2020-12-17 19:39:12 +01:00
Wim Taymans
e0580fedc1 pulse-server: handle seek flags and offset
Fixes #485
2020-12-17 16:49:17 +01:00
Wim Taymans
b812dbcbf6 impl: always copy the id in param_info
Or else we will not have the right id when the flags are 0
2020-12-17 16:11:30 +01:00
Wim Taymans
f8c96167f9 impl: Only return -ENOENT when param does not exist
We checked above if the param exited and returned -ENOENT if not.
When we can't find any parameter, simply return 0.
2020-12-17 15:56:22 +01:00
Wim Taymans
724d2581f0 pw-dump: add final \n at the end 2020-12-17 15:10:43 +01:00
Wim Taymans
0e9ba69d3a pw-dump: simplify the state handling
Fixes first \n
2020-12-15 18:12:21 +01:00
Wim Taymans
5e99ff52e7 pw-dump: handle NULL in link format 2020-12-15 10:17:47 +01:00
Wim Taymans
cc31412ef3 pw-dump: handle 0 size string 2020-12-14 17:15:49 +01:00
Wim Taymans
69ea147a29 pw-dump: add optional object id 2020-12-14 16:57:09 +01:00
Wim Taymans
5e33352d5d pw-dump: escape keys and strings
Use the json escape function to escape keys and strings.
Make most put functions accept an optional key
Use flags helper for permissions as well
2020-12-14 16:46:23 +01:00
Wim Taymans
8f85e74b5d pw-dump: add colors on tty 2020-12-14 16:19:56 +01:00