summaryrefslogtreecommitdiff
path: root/src/modules/module-client-node/client-node.c
AgeCommit message (Collapse)AuthorFilesLines
2019-11-28client-node: use bound id from the proxybound_idWim Taymans1-1/+0
Remove the obsolete node_id from the transport. We get this info now from the proxy.
2019-11-28emit bound_id eventWim Taymans1-0/+2
2019-10-08Remove some unused fieldsWim Taymans1-3/+0
2019-10-02port: select a mixer when we set a formatWim Taymans1-7/+3
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-09-16rename HAVE/NEED_BUFFER -> HAVE/NEED_DATAWim Taymans1-3/+3
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-27io: add support for segmentWim Taymans1-1/+1
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-16core: remove parent_id from the global eventWim Taymans1-4/+9
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-16client-node: dont' send peer_added with our own nodeWim Taymans1-0/+3
.. because it's just ignored in the client anyway.
2019-08-15client-node: keep port buffers in special locationWim Taymans1-4/+8
Keep the output port buffers in a special mix info. They should stay there even when the mix is removed and should only be cleared explicitly with a NULL Format or 0 use_buffers.
2019-08-14client-node: only clear buffers when format clearedWim Taymans1-5/+17
.. like we don on the client.
2019-08-14client-node: clean up buffers and other memoryWim Taymans1-0/+1
2019-08-14improve debugWim Taymans1-36/+40
2019-08-13client-node: always remove the previous io memoryWim Taymans1-6/+6
2019-08-12port: return async result from use_buffers if anyWim Taymans1-2/+2
2019-08-12channelmix: implement per channel volumeWim Taymans1-5/+0
Implement per channel volume on channelmix. Extend control on stream to take an array of values when possible. Remove name argument from pw_node_new and pw_device_new. We can pass this as a property instead. Improve properties on nodes to more closely match what pulseaudio does. Don't let the monitor do too much with the udev properties but let the session manager set the description and icon-names. Remove some change_mask flags for things that don't change in introspect. Use the flags to mark changes in -cli and -monitor.
2019-08-07port: simplify buffer allocationWim Taymans1-1/+1
Use just one function to do buffer allocation on a port. Remove some unused variables.
2019-08-06link: improve buffer negotiationWim Taymans1-2/+2
Don't free the buffers when the mix is released, this will happen when nothing is using them anymore with port_use_buffers later. Mark a mixer as having buffers when the output port has buffers. Don't set buffers on a mixer port that already has buffers.
2019-08-01mem: add size of tag to make it possible to check subtagsWim Taymans1-2/+2
2019-07-29client-node: also track memory on the serverWim Taymans1-49/+53
Do the same kind of memory tracking on the server side so that we can remove the fd from the client when unused.
2019-07-29improve debugWim Taymans1-1/+2
2019-07-26Add support for client fd memoryWim Taymans1-0/+55
Remove the node buffers reply again. We don't need it. Instead add a new method to the client-node to upload an array of buffer datas. This method is called after the client has allocated buffer mem. It will update the buffers on the server side with the client allocated memory. Wait for the async reply of use_buffers when doing alloc_buffers so that we can get the updated buffer mem before we continue. Let the link follow the states of the ports. Add some error code to the port error states. Add PW_STREAM_FLAG_ALLOC_BUFFERS flag to make the client alloc buffer memory.
2019-07-25node: remove port_alloc_buffersWim Taymans1-39/+0
Remove the now obsolete port_alloc_buffer, rework to use the port_use_buffers with the ALLOC flag.
2019-07-25node: add flags to port_use_bufferWim Taymans1-4/+9
Remove the CAN_USE_BUFFERS flag, it is redundant. We can know this because of the IO params and buffer params. Add flags to the port_use_buffer call. We also want this call to replace port_alloc_buffer. Together with a new result event we can ask the node to (a)synchronously fill up the buffer data for us. This is part of a plan to let remote nodes provide buffer data.
2019-07-25mem: Add tag to memmapWim Taymans1-23/+28
Add a tag field when creating a memmap so that we can do lookup on it. This makes it easier to implement the tracking of mappings for io areas. Remove custom io memory tracking and use the tags. Add flags to spa_chunk to make data corrupted. The flags on the buffer stay constant for the life of the buffer. Add flags to mark memory readable and writable. Mark memory readonly in v4l2-source. Pass the daemon activation area to the client in the transport event. This never changes and need to be handled differently from the other activation areas. Use the right flags when importing memory. Add the (desired) memory type to mempool_alloc. improve some debug.
2019-07-24mem: set READWRITE flagsWim Taymans1-0/+1
2019-07-24mem: use MemId to pass buffer memoryWim Taymans1-6/+9
Track memory on buffers in the server and simplify some memory tracking on the client. Don't send internal memblock flags to client. Add read/write flags to memblock.
2019-07-23mem: improve memory handlingWim Taymans1-188/+45
Add a memory pool to manage blocks of memory. Make it possible to allocate and import blocks. Add add_mem and remove_mem to the core events to signal a client of a block of memory. Remove the client-node add_mem. Make a global pool for memory and a per client pool where we import and share the memory we need with the client. Use the new memory pool to track and map memory in clients.
2019-07-19client-node: track and free activation memoryWim Taymans1-3/+30
2019-07-16client-node: improve cleanupWim Taymans1-1/+8
2019-07-15improve some debugWim Taymans1-1/+1
2019-07-02Improve debug and small cleanupsWim Taymans1-1/+1
2019-07-01small cleanupsWim Taymans1-30/+32
2019-06-20improve error handling some moreWim Taymans1-6/+20
2019-06-19improve error handlingWim Taymans1-0/+20
2019-06-06System: More work on making system functions pluggableWim Taymans1-10/+18
Move the epoll functions to the system functions and make the loop use those. Use simple mask for events instead of enum. Add the used system api in pw_loop. Add System API to spa_support and use it where possible. Pass the system API used in the realtime loops in spa_support as well and use this in the realtime paths. Improve bootstrapping, load only the log and cpu interfaces because those can/need to be shared between instances. Let the core load the other interfaces. Add keys to configure the System and Loop implementations used in pw_loop.
2019-05-29spa: use core to load spa_handleWim Taymans1-1/+1
2019-05-29clean up proxy and resource apiWim Taymans1-9/+11
Remove override for resources, it can't work in general. Rename method to add_object_listener to add a listener for events/methods from the remote object. Rename some methods to _call to call the interface and _notify to notify the listeners. Remove unused client event to be notified of resource implementations.
2019-05-28spa: add result typeWim Taymans1-4/+4
We need this to know the type of result, especially when serializing.
2019-05-28add const to spa_event and spa_commandWim Taymans1-1/+1
2019-05-24keys: add keys.h with defines and docsWim Taymans1-1/+1
Add a keys.h file that lists and documents all keys available to be used in properties.
2019-05-23interface: add an interface structiface2Wim Taymans1-105/+117
The interface struct has the type,version and methods of the interface. Make spa interfaces extend from spa_interface and make a separate structure for the methods. Pass a generic void* as the first argument of methods, like we don in PipeWire. Bundle the methods + implementation in a versioned inteface and use that to invoke methods. This way we can do version checks on the methods. Make resource and proxy interfaces that we can can call. We can then make the core interfaces independent on proxy/resource and hide them in the lower layers. Add add_listener method to methods of core interfaces, just like SPA.
2019-05-20Move implementation helpers to utilsWim Taymans1-0/+1
2019-05-15hook: separate spa_callbacks from the hookWim Taymans1-3/+3
Make a spa_callbacks with just the functions and data and use this in the hook and objects.
2019-05-15hooks: use hook to implement the callbacksWim Taymans1-6/+3
This way we get the version check implemented and save some code.
2019-05-14hook: handle port and factory implementation with hookWim Taymans1-3/+1
This way we can also handle the version number.
2019-04-10make bitfields unsignedWim Taymans1-2/+2
Remove driver property from client-node of client-stream.