Pauli Virtanen
d87f838e09
media-session: don't write to freed memory in sm_object_destroy
...
Unref of node->handle may also free obj, if it was created by
init_object.
2021-01-09 20:37:01 +02:00
Wim Taymans
deb3fa1d9b
media-session: handle device events
...
The object config event should set props on the object.
2021-01-07 17:30:10 +01:00
Wim Taymans
962bf4d897
media-session: clean proxy and handle in destroy
...
After we called destroy on the handle and proxy we should not
try to access them anymore so we set them to NULL.
See #534
2021-01-05 10:05:30 +01:00
Wim Taymans
b4f359ed77
media-session: ensure unique node names
...
Fixes #525
2021-01-02 20:07:27 +01:00
Wim Taymans
498b4bd080
media-session: ensure unique device.name
...
See #525
2021-01-02 20:00:03 +01:00
columbarius
e871b761fe
examples: only announce SPA_DATA_MemPtr
2021-01-01 21:12:00 +01:00
columbarius
7ad1ee0cec
examples: use dataType mask for consumers
...
Set the dataType mask to MemFd and MemPtr since we implemented the MemPtr API and get MemFd mapped by pipewire.
2021-01-01 21:12:00 +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
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
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
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
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
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
2bd5dac306
media-session: create seq-bridge after we have permissions
...
See #423
2020-12-18 12:04:49 +01:00
Wim Taymans
bec950440b
alsa-monitor: add wildcard to disable hardware-mixers
2020-12-11 10:10:05 +01:00
Wim Taymans
760a63d340
metadata: clear item before remove
...
Otherwise the item is overwritten with the next entry and we should
not clear it.
2020-12-09 21:18:58 +01:00
Wim Taymans
3c2ab98a2a
Add support for virtual source
...
A virtual source is usually implemented with a null-sink, it looks
like a source to pulseaudio clients but just forwards what it gets
as input.
Make sure the port names make sense.
You can use the null sink now as:
pactl load-module module-null-sink sink_name=source object.linger=1
media.class=Audio/Source/Virtual channel_map=FL,FR,RL,RR
This creates a node with "input" and "capture" ports and looks
like a virtual source for pulseaudio clients.
pactl load-module module-null-sink sink_name=source object.linger=1
media.class=Audio/Sink channel_map=FL,FR,RL,RR
This creates a node with "playback" and "monitor" ports and looks
like a virtual sink for pulseaudio clients.
pactl load-module module-null-sink sink_name=source object.linger=1
media.class=Audio/Duplex channel_map=FL,FR,RL,RR
This creates a node with "playback" and "capture" ports and looks
like a virtual source and sink for pulseaudio clients.
2020-12-02 15:42:56 +01:00
Wim Taymans
d6127a4745
handle Duplex media class
...
Audio/Duplex is both a source and a sink. Name the ports as input/output
and make sure we list them in the source and sink lists in pulse-server.
2020-12-02 11:44:19 +01:00
Wim Taymans
e995d3a832
media-session: store config data as json objects
...
So that we can use the json string escaping functions for keys
and use multiline config files.
2020-12-01 12:05:08 +01:00
Wim Taymans
19dc150643
media-session: don't emit metadata remove in shutdown
...
When in shutdown we destroy all objects but don't remove all
the metadata associated with them, like route settings.
2020-12-01 12:03:28 +01:00
Wim Taymans
19a67a2da5
media-session: add option to disable hardware volume
...
See #426
2020-12-01 10:45:24 +01:00
Wim Taymans
23bcc21240
media-session: remove metadata when default node is removed
2020-12-01 09:24:16 +01:00
Wim Taymans
f8e501169b
media-session: count property changes correctly
2020-11-30 15:05:53 +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
62cdec8448
spa: move json parser to utils
...
Add unit test
Add escape function
2020-11-28 15:34:01 +01:00
Wim Taymans
261144c27f
media-session: add /etc/pipewire/media-session.d/ dir
...
Placing files in it will activate options in the session manager.
2020-11-25 16:13:20 +01:00
Wim Taymans
6ab25c6904
pulse-server: fix parsing of format-info
...
Fixes totem playback
2020-11-24 15:11:05 +01:00
Wim Taymans
b86acec625
media-session: ignore empty channelMap/channelVolume
2020-11-23 20:18:32 +01:00
Wim Taymans
c5ac48c5f4
media-session: clear metadata
2020-11-23 19:35:23 +01:00
Elliott Sales de Andrade
86fd6a0d3e
Fix some possible-NULL pointer usage.
2020-11-23 15:36:08 +00:00
Wim Taymans
2b95afeddc
media-session: add and parse channelmap in routes and stream
2020-11-23 15:34:24 +01:00
Wim Taymans
1f73280c52
media-session: fix parsing of booleans and null
...
Reorder the json file a bit
2020-11-23 10:10:59 +01:00
Wim Taymans
7ca8491be3
media-session: store values as json
...
Save settings as jason and use a small json compatible tokenizer to
load settings instead of our own less flexible format.
Save settings with a prefix and filter out entries without prefix
Listen for changes in restore.stream metadata and update properties.
2020-11-22 10:00:58 +01:00
Wim Taymans
b922f99293
restore-stream: expose stream restore info in metadata
2020-11-20 18:01:20 +01:00
Wim Taymans
5af2efdaa6
media-session: expose metadata method
...
Expose a method to create an export metadata with a certain name.
2020-11-20 17:58:08 +01:00
Wim Taymans
dae64bd2b5
policy-node: keep track how many times we link a node
...
Nodes that are marked as DONT_RECONNECT are only linked once.
Fixes a problem where a clients makes a DONT_RECONNECT stream but
without a specific sink.
See #395
2020-11-20 14:54:37 +01:00
Wim Taymans
00ac94ab9b
fix compilation
2020-11-20 12:51:51 +01:00
Wim Taymans
b3aa346063
handle core error better
...
Use the PW_ID_CORE constant
Quit the mainloop when server disconnected in the tools
See #395
2020-11-20 12:29:51 +01:00
Wim Taymans
7ac23c8b82
improve some docs about options
...
See #387
2020-11-17 21:00:17 +01:00
Frédéric Danis
6308c5d806
bluez5: backend-hsphfpd: Add mSBC support
...
mSBC can be enabled by passing "bluez5.msbc-support=true" parameter to
pipewire-media-session.
mSBC is automatically selected if remote device supports it.
2020-11-16 18:15:39 +01:00
Wim Taymans
6fa622d2d9
policy-node: only reconnect to given path_id
...
When the node is not found and we are not allowed to reconnect to
something else, error.
2020-11-16 13:28:35 +01:00
Wim Taymans
10207456f0
media-session: don't start pulse-bridge automatically
...
Don't start the pulse-bridge automatically because we don't
know what socket to listen on.
Also, listen by default on a safe socket, not used by pulseaudio.
2020-11-12 16:50:24 +01:00
Wim Taymans
1d001974d7
media-session: enable pulse-bridge by default
...
Now that we don't interfere with pulseaudio, enable it by default.
2020-11-12 11:11:53 +01:00
Greg V
cc0386e1c5
media-session: ifdef Linux-specific file option
2020-11-09 11:14:20 +00: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