summaryrefslogtreecommitdiff
path: root/src/modules
AgeCommit message (Collapse)AuthorFilesLines
2019-11-28client-node: use bound id from the proxybound_idWim Taymans3-11/+14
Remove the obsolete node_id from the transport. We get this info now from the proxy.
2019-11-28remote: remove obsolete exported eventWim Taymans1-2/+0
We can now do the same and more with the bound event on the proxy.
2019-11-28emit bound_id eventWim Taymans4-0/+15
2019-11-28interfaces: add event to notify of global bound idWim Taymans1-0/+31
Make it possible to know when a proxy is bound to a global id before the global shows up in the registry. This makes it possible to match locally created objects to the one appearing in the registry and possibly avoid a second bind.
2019-11-25Make sure we bind before registering the globalWim Taymans3-54/+84
Bind to the resource in create_object before we register the global. This ensure a client gets to see the resource global id associated with the resource before it appears in the registry, which makes it easier to patch the local proxy to the global object.
2019-11-21Add printf checks for proxy_error and resource_errorWim Taymans14-33/+33
Add an error variant without checks.
2019-11-21remote-node: don't enum invalid param idsWim Taymans1-0/+4
2019-11-21improve some debugWim Taymans1-5/+5
2019-11-19client: don't register in client_new()Wim Taymans1-2/+10
Don't register in client_new() to make it possible to do other things on the client before registering. Register the client in protocol-native after we set up the events etc.
2019-11-19client: register the global early, in pw_client_new()George Kiagiadakis1-3/+0
otherwise, if the access module blocks the client, the on_start callback in the protocol is not called and there is no global, which means the session manager cannot do anything to grant permissions on this client and the client is blocked forever
2019-11-19Implement _gettid() for FreeBSD and do not call pthread_setschedparam() with ↵Gleb Popov1-0/+11
SCHED_RESET_ON_FORK argument.
2019-11-19Don't call getsockopt with SO_PEERCRED and SO_PEERSEC parameters on FreeBSD.Gleb Popov1-0/+2
2019-11-19system: use spa_system functions for fdsWim Taymans4-14/+18
2019-11-07session-manager: split policy and monitorWim Taymans5-3/+5
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-05properties: copy_keys -> update_keysWim Taymans4-4/+10
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-04protocol: init spa_dict properlyWim Taymans3-16/+16
Or else the flags might be wrong.
2019-11-04session-manager: fix protocolWim Taymans5-14/+17
Add separate types for interfaces and implementation Fix some bugs in the protocol Add some introspection support in cli
2019-11-04extensions: implement new session manager extensionGeorge Kiagiadakis15-0/+4491
This extension, implemented in module-session-manager, implements a set of objects that are useful for session managers.
2019-11-03metadata: Add metadata APIWim Taymans6-0/+963
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-03protocol: add flags to protocol marshalWim Taymans6-51/+71
Allows us to to select marshallers for implementation and binding.
2019-10-25add some docsWim Taymans1-1/+1
2019-10-25fix includesWim Taymans10-0/+19
2019-10-23remote-node: implement suspendWim Taymans1-0/+9
2019-10-08protocol-native: don't try to flush when the source is goneWim Taymans1-1/+1
When the connection is broken, we destroy the source avoid trying to flush when the source is gone.
2019-10-08protocol: add v0 compatibilityWim Taymans16-50/+4765
For flatpaks we need to be able to support older v0 protocol clients. To handle this we have: - the connection detects an old client when it receives the first message. It can do this by checking the sequence number, on old versions it contains the message size and is never 0, on new clients the sequence number is 0. - We add a new signal at the start of the connection with the detected version number. This installs the right version of the core proxy. We also move the binding of the client until the hello message is received. This way we can have a new client connect (portal), hand over the connection to an old client, which then removes the client binding again in the hello request with a v0 version. There are some changes to the passing of fds in v0 vs v3 which need to investigated some more. - bump version of our interfaces to 3. This makes it possible to have v0 and v3 protocol marshal functions. - Add version number in the proxy. This is mostly automatically done internally based on the version numbers the library is compiled with. Where the version number was in the API before, it is now actually used to look up the right protocol marshal functions. For Proxies there is usually just 1 version, the current one. It is the server that will support different versions. - Add v0 compat marshal functions to convert from and to v0 format. This has some complications. v0 has a type map it keeps in sync with the server. For this we have a static type map with mappings to our own v3 types. Pods are mostly the same except for objects that used to have arbitrary pods in v0 vs spa_pod_prop in v3. Also convert between v0 spa_pod_prop and v3 spa_pod_choice. Formats and commands are also slightly different so handle those mappings as well. We only have marshal functions for the server side (resource) v0 functions. - Add v0 compatible client-node again. It's a bit tricky to map, v0 client-node basically lets the server to the mixing and teeing and just does the processing of the internal node.
2019-10-08Remove some unused fieldsWim Taymans1-3/+0
2019-10-02improve properties on objectsWim Taymans4-10/+50
2019-10-02port: select a mixer when we set a formatWim Taymans4-142/+4
When the port receives a format, look if we can find a mixer for it and configure it. Use the float32 mono mixer when possible. Use the new pw_buffers in the link. Let the port allocate buffers between the mixer and node when requested. The client-node doesn't need a mixer because mixing is done on the client. Remove all mixer and buffer negotiation code from adapter because it is now done at the port level.
2019-10-02flags: change flag macrosWim Taymans5-939/+7
SPA_FLAG_CHECK -> SPA_FLAG_IS_SET SPA_FLAG_UNSET -> SPA_FLAG_CLEAR Add SPA_FLAG_UPDATE
2019-10-01protocol: improve flushingWim Taymans2-39/+62
Use the IO_OUT flag to schedule flushing instead of a flush_event. Handle EGAIN and wait for IO_OUT to try again. Fixes #111
2019-10-01connection: move remaining data and fdsWim Taymans1-9/+14
If we can't send all of the data, move the remaining data to the start of the buffer so that we can send it again later. See #111
2019-09-27remote: take ownership of properties in _export()Wim Taymans2-2/+10
pw_remote_export() takes ownership of the properties so implement this in the device and spa_node export functions. Fixes #187
2019-09-25adapter: put port channel in port name if possibleWim Taymans1-1/+1
2019-09-23improve properties on node and portWim Taymans1-13/+14
Rename some alsa filenames.
2019-09-20improve properties on globals and portsWim Taymans1-2/+4
2019-09-20monitor: remove monitor API and use deviceWim Taymans6-530/+0
Remove the monitor API, we can use the device API for it. Make sure we support creating devices (like alsa) from another device (udev). Use new object.id to store the object id in the object properties. Use the port.id/node.id etc to make relations to other objects.
2019-09-16rename HAVE/NEED_BUFFER -> HAVE/NEED_DATAWim Taymans3-9/+9
It is more generic and works with control-only ports as well
2019-09-09data-loop: add _wait functionWim Taymans1-3/+3
Add function to wait for one iteration of the loop. This can be used by specialized implementations of the data loop, like jack.
2019-09-02node: improve position and transportWim Taymans1-2/+2
Reorganize some things, let the clients update the segment info in their own activation, then let the server merge it. This avoids clients stepping on eachother. When looping through the clients, copy the segment info when we encounter its owner. Remove the list of segment owners to the activation. This is better than in the activation because we can then just keep one list of owners. Remove the NONBLOCK flag from the eventfd so that we can do blocking reads as well. Just keep a reposition owner in the driver activation. This points to the node that has the reposition info. This avoid complicated synchronization to keep multiple nodes from stepping on eachother. Now they can just prepare the reposition info in their activation and set themselves as the reposition owner. The last one who succeeds wins.
2019-08-30protocol-native: attempt to remove socketWim Taymans1-0/+12
After we grab the lockfile we should remove the socket when it exists so that we can bind again. This should solve startup problems after a crash, which left the socket around and caused bind failures.
2019-08-27io: add support for segmentWim Taymans2-3/+3
Move fields from the io_position to io_segment. The segment contains the mapping between raw clock time and stream time in various formats. We keep an array of pending segments available in the io_position field so clients can anticipate changes. Make looping a flag in the segment instead of a state. Prepare for segment masters. These will be registered clients that are responsible for updating parts of the extended segment info. Add namespace to some defines.
2019-08-22client-node: also don't remove our own activationWim Taymans1-2/+4
.. because we don't add it.
2019-08-22client-node: refuse params on the wrong side of our mixersWim Taymans1-0/+8
2019-08-22node: add xrun callbackWim Taymans1-3/+22
Let alsa emit xrun callbacks. Write the xrun stats to the activation area of the node so all clients can read it.
2019-08-21remote-node: avoid map and unmap for our own nodeWim Taymans1-11/+9
2019-08-20protocol: we need to read Fd into int64_tWim Taymans2-6/+10
2019-08-19protocol-native: downgrade getsockopt SO_PEERSEC error to warningGeorge Kiagiadakis1-1/+1
Getting SO_PEERSEC on distributions that do not use a LSM by default, results always in a "protocol error", which is just annoying and not a real problem for pipewire's operation.
2019-08-16connection: use right sizeWim Taymans1-1/+1
2019-08-16core: remove parent_id from the global eventWim Taymans24-228/+201
Remove the parent_id from the global event. Remove the parent and owner from the global object. Use properties instead to mark parents and owners of objects. Properties are easier to control for client exported objects and usually a simple parent/child is not enough. For example, a client exported node has the client as a parent but also the factory that created the node.
2019-08-16proxy: add refcount to keep the proxy alive in demarshalWim Taymans1-1/+5
We need to keep the proxy alive during demarshal because the callbacks might decide to destroy the proxy.