Commit graph

1738 commits

Author SHA1 Message Date
Gleb Popov
6ea24a7db5 Don't call getsockopt with SO_PEERCRED and SO_PEERSEC parameters on FreeBSD. 2019-11-19 13:41:40 +01:00
Gleb Popov
33df224254 Use pthread_set_name_np() instead of pthread_setname_np() on FreeBSD. 2019-11-19 13:41:40 +01:00
Gleb Popov
feb9a4b9e1 Don't call prctl() on FreeBSD. 2019-11-19 13:41:40 +01:00
Gleb Popov
0a21c61ed0 Don't define memfd_create() and USE_MEMFD on FreeBSD. 2019-11-19 13:41:40 +01:00
Gleb Popov
ef3ebbed46 Define empty struct ucred on FreeBSD. 2019-11-19 13:41:40 +01:00
Gleb Popov
fd937fa378 On FreeBSD, add dependency on epoll-shim library.
FreeBSD doesn't provide timerfd and eventfd functions. These are implemented in
3rd party library called epoll-shim. Link targets requiring these functions to
this library.
2019-11-19 13:41:40 +01:00
Wim Taymans
68e94a2e7e system: use spa_system functions for fds 2019-11-19 13:41:40 +01:00
Wim Taymans
b14bb1f496 media-session: don't include use-case.h
We only use the use-case manager in alsa-endpoint
2019-11-19 11:29:50 +01:00
Arun Raghavan
f61498b863 session-manager: Fix use-case.h include ordering
Seems like the ALSA requires the general headers to be included before
use-case.h.
2019-11-19 07:45:43 +05:30
Wim Taymans
3c51f559ef elsa-endpoint: include asoundlib first 2019-11-18 10:40:50 +01:00
Wim Taymans
9f765897db add missing files 2019-11-07 16:39:13 +01:00
Wim Taymans
4ad7ce3aa2 session-manager: split policy and monitor
Separate the session manager in a monitor and policy part.

The monitor manages the devices and endpoints.

The policy watches the nodes/ports/clients and applies the policy
of linking them.

Because both now have a separate connection, we can remove some
hacks in the protocol. When a remote was both the implementer and
user of an object we could get in a deadlock when the user was
blocked waiting and the implementator was blocked sending a reply.
We used to un-busy a client when it was expecting a reply from a
ping or sync for this reason.

Add and use some more keys for the endpoints and streams.
2019-11-07 16:03:00 +01:00
Wim Taymans
74b4790afe core: handle error when creating memorypool
Start data loop later.
2019-11-07 11:43:09 +01:00
Wim Taymans
638ee33f44 remote: only load protocol when not already loaded 2019-11-07 11:41:14 +01:00
Wim Taymans
9df6efcd8d properties: copy_keys -> update_keys
Change copy_keys to update_keys and make it more powerful by taking
a spa_dict as the source.
Copy some more properties in the session.
2019-11-05 16:35:15 +01:00
Wim Taymans
60cd74fdb0 alsa: set MEDIA_CLASS in nodes 2019-11-05 16:34:12 +01:00
Wim Taymans
1f5aa26452 type: move implementations to a separate section 2019-11-05 16:31:40 +01:00
Wim Taymans
8409e8be49 endpoint: make endpoints of alsa devices
Make one endpoint for each device
Make a stream for each node
2019-11-04 17:30:33 +01:00
Wim Taymans
6397db9d68 protocol: init spa_dict properly
Or else the flags might be wrong.
2019-11-04 17:30:33 +01:00
Wim Taymans
085f1822b9 session-manager: fix protocol
Add separate types for interfaces and implementation
Fix some bugs in the protocol
Add some introspection support in cli
2019-11-04 17:30:33 +01:00
George Kiagiadakis
15f3d28e11 daemon config & remote: load module-session-manager by default
Upstream-Status: Pending
2019-11-04 17:30:33 +01:00
George Kiagiadakis
d6dc0d0356 pipewire-cli: add support for printing endpoint info & params
Upstream-Status: Pending
2019-11-04 17:30:33 +01:00
George Kiagiadakis
1e14206c71 extensions: implement new session manager extension
This extension, implemented in module-session-manager, implements
a set of objects that are useful for session managers.
2019-11-04 17:30:33 +01:00
Wim Taymans
d79abd1502 install metadata header 2019-11-03 16:39:56 +01:00
Wim Taymans
57299ec491 Add missing files 2019-11-03 11:25:23 +01:00
Wim Taymans
0a81a982f7 metadata: Add metadata API
Metadata allows apps to attach properties to objects that can be
read by other apps.
Not complete yet, properties should be removed when the object is
removed.
2019-11-03 10:31:14 +01:00
Wim Taymans
8ddf579cc0 protocol: add flags to protocol marshal
Allows us to to select marshallers for implementation and binding.
2019-11-03 10:21:57 +01:00
Wim Taymans
c842b5adf2 reserve: fix RequestRelease
Only fail when message is NULL
Actually send the message as well
2019-11-03 10:12:45 +01:00
Wim Taymans
140203d5a3 core: add and use some keys for cpu settings 2019-10-29 12:48:07 +01:00
Wim Taymans
b4b69473d3 filter: add filter API
The filter API is meant for making generic audio and video filters.
It's like a pw_stream but with many in/out ports and no conversion.
Eventually the pw_stream will be implemented with the filter.

Add some example audio and video filters.
2019-10-29 11:59:58 +01:00
Wim Taymans
858a5017ed small cleanups 2019-10-28 13:21:40 +01:00
Wim Taymans
ebb5ed94a2 add some docs 2019-10-25 15:01:27 +02:00
Wim Taymans
9ffec214b8 fix includes 2019-10-25 15:01:02 +02:00
Wim Taymans
af73585948 Increase max buffer size 2019-10-24 15:26:59 +02:00
Wim Taymans
12fb58add1 core: explicitly calculate min and max quantum
Just clamp to default for now until we can implement power save mode.
2019-10-24 12:19:21 +02:00
Wim Taymans
b74080ea55 alsa: give capture stream highest priority
Make sure we always make the capture device a master. We would prefer
to only do resampling on the sinks when we need to.
2019-10-24 11:06:37 +02:00
Wim Taymans
320dc203cf export-spa: print node id 2019-10-23 17:37:10 +02:00
Wim Taymans
38bc80a3b8 remote-node: implement suspend 2019-10-23 17:20:46 +02:00
Wim Taymans
e8464cf1b3 port: fix client-side buffers again
Clear the ALLOC flag for the mixer use_buffers only when the node did
the allocation already.

Fixes #193
2019-10-23 16:45:22 +02:00
Wim Taymans
54f6834de4 io: add clock_id to clock
Can be used to determine if we need to slave or not.
Add node abi test
Fix some headers
2019-10-23 13:13:01 +02:00
Wim Taymans
ff96165035 Improve debug 2019-10-22 13:06:20 +02:00
Wim Taymans
eb1d675cb0 node: add master priority
Change node.priority to priority.session to indicate that this
is the priority that the session manager uses to select the node.

Add another priority.master that the core uses to select a master
driver. Keep the driver nodes sorted by master priority.

Let jack always prefer to connect to the master driver nodes.
2019-10-22 12:25:25 +02:00
Wim Taymans
3aa19dd38a node: send Suspend to the node
Send suspend to the node when suspending. This is usually the same
as puse for all nodes.
Implement negotiation when we Start audioadapter. This makes it
easier that to track the ports that are negotiated for now.
Use Suspend to clear the audioadapter negotiation.
2019-10-21 17:24:51 +02:00
Wim Taymans
34a1a988ba session: make a jack device
Add a jack device and activate it when we release the device (for JACK
presumably). We need to work around some issues, jack does not allow
us to connect yet when it asks to release the device so we need to
wait a little and then connect.
2019-10-21 16:39:08 +02:00
Wim Taymans
128a8e6c3c cli: add create-device command
Add create-device command
Add short command aliases
2019-10-21 16:00:43 +02:00
Wim Taymans
1eca773145 media-session: only deal with state when it changed
Look at the change_mask and only deal with the state when it changed
or else we might start the idle timer again when something unrelated
changed.
2019-10-18 21:52:24 +02:00
Wim Taymans
102bd21d0e alsa: lower priority of cards with device not starting from 0 2019-10-17 13:03:28 +02:00
Wim Taymans
ecd8dbc7f0 node: add node.priority
Add a simple priority to nodes.
2019-10-17 12:43:23 +02:00
Wim Taymans
7798cf7364 core: improve alignment
Use the CPU alignment to align memory of allocated buffers. This makes
it more likely that all CPU optimizations can be done.
2019-10-17 09:34:27 +02:00
Wim Taymans
8899d00bfc control: add control mixer plugin
Add a mixer plugin for control messages and plug it in ports with
control messages.
2019-10-16 11:13:23 +02:00