Commit graph

308 commits

Author SHA1 Message Date
Wim Taymans
3dc6820e9e Don't use __ in defines or declarations, it's reserved
SPA_TYPE -> SPA_TYPE_INFO for type info strings
improve includes

Fixes #115
2019-01-14 13:00:00 +01:00
Wim Taymans
505eb7a423 protocol: automatically bind to the client as well
Bind to the client as well as the remote core. This way we will be
able to update our properties and permissions directly on the client.
2019-01-10 11:01:30 +01:00
Wim Taymans
66bab1d9b2 remote: remove some events
Remove some events from the remote that we can find on the core_proxy.
Use the core_proxy to get to the done and info events.
Remove pw_remote_get_core_info(), we don't need this anymore now that
we don't listen for the event and the user can keep track of this
herself.
2019-01-10 10:08:14 +01:00
Wim Taymans
979d155382 core: add user_data to core 2019-01-08 17:32:37 +01:00
Wim Taymans
3be759ced2 stream: handle proxy destroy
When the proxy is destroyed, mark the stream as unconnected and remove
our reference to the proxy.
2018-12-14 16:38:46 +01:00
Wim Taymans
0a27040c9a port: keep track of mix port states
Keep track of the state of the mixer ports and update the port state
accordingly. This avoids clearing the format or buffers on the port
when mixers are still busy.
2018-12-13 12:04:02 +01:00
Wim Taymans
e1bd12e599 device: add device object
Make a device object, let the v4l2 monitor create device objects
The device object is responsible for dynamically creating nodes.
2018-11-23 12:43:47 +01:00
Wim Taymans
85f2e93c54 Relicense as MIT/X11
Remove some obsolete files
2018-11-05 17:48:52 +01:00
Wim Taymans
7e8fac2272 type: restore type info for pipewire types 2018-10-31 16:05:58 +00:00
Wim Taymans
95c1b7d0a3 remote: add exported signal
Add a signal to notify when a proxy id has been expored. Use this in the
stream to signal the configure state.
2018-10-31 14:31:49 +00:00
Wim Taymans
0bc6ba8559 node: allow for setting driver root
The driver root is the graph that should be run when a remote driver
starts the graph and can be different from the node itself when it's
part of a subgraph like in client-stream.
2018-10-31 10:57:26 +00:00
Wim Taymans
1c450ce2c1 client: add check_access signal
Fire the check access signal right after creating a client to make it
possible to set permissions.
2018-10-29 08:44:56 +00:00
Wim Taymans
bd9b74f2d8 global: add list of resources in the global
Remove the list of resources from objects to the global
2018-10-27 17:24:15 +01:00
Wim Taymans
723d4d9db7 client-node: use spa_io_position
Remove old internal structure
2018-10-24 10:34:28 +02:00
Wim Taymans
87d30a0e04 port: don't keep port flags
Always query the port flags when we need them because they can change
and there is therefore no need to keep them around.
2018-10-15 17:49:54 +02:00
Wim Taymans
63333adca3 port: don't keep port_info around but make copy 2018-10-08 13:00:18 +02:00
Wim Taymans
ea739df26f remote: notify error
Don't fail on errors but emit a signal
2018-10-03 19:30:06 +02:00
Wim Taymans
f3dfe61aa0 link: add link state and error to info
Notify when state changes
2018-10-03 19:29:11 +02:00
Wim Taymans
0f69a7b767 node: remove and add node from graph in idle/running
Add the node and all links to the graph when going to running and
remove them again when idle.
2018-10-02 05:10:55 +02:00
Wim Taymans
18408dad81 port: handle control only ports
Mark ports with only control io as control ports and skip negotiation
of buffers and format for them.
2018-09-28 17:55:01 +02:00
Wim Taymans
d4fa4e63e8 remove unused type map
Add reset methods for array and map
Signal disconnect before destroying the proxies in remote.
2018-09-26 13:11:23 +02:00
Wim Taymans
9b2a051daf link: add feedback links
Check if a link is a feedback loop. For feedback loops we want to
schedule the consumer before the provider.
2018-09-25 17:10:06 +02:00
Wim Taymans
3af7b42193 node: update quantum dynamically
Keep the requested quantum around and recalculate when nodes are
added and removed from the driver graph.
2018-09-20 17:47:22 +02:00
Wim Taymans
05d3502c84 control: rework for spa_io_sequence
Put a pw_control object on all ports that support control messages.
Allow linking of control objects (and thus ports).
Make export-sink generate control messages to update the contrast
property.
2018-08-30 09:54:54 +02:00
Wim Taymans
fca3e1d85d Remove dynamic types
Do not use dynamic types anymore. The reason is that it's difficult:

- to maintain a shared type database over a network.
- the extra overhead when translating between processes and for
  maintaining the translation tables.
- race conditions in translating in RT-threads, this is a problem
  because we want to make event streams.

We now have simple enums with types and extension points for all
types. This is also nicer to use in general.
We don't need the mapper anymore or pass strings around as types.
There is a parallel type info system to get more info about ids and
enums and their hierarchy. It can also be used for debugging.
2018-08-23 17:47:57 +02:00
Wim Taymans
a6ad8f747f remove spalib 2018-08-14 15:29:25 +02:00
Wim Taymans
a63523650d hooks: enforce version on hook emission
Pass the minimum required version to the hook emission and only call
events when the handler is recent enough.
Add some macros to make event emission easier to read.
2018-08-01 21:41:25 +02:00
Wim Taymans
ca898a00db work on separating port mixers
Make it possible to assign an arbitary node as the port mixer.
Also remove dynamically added ports.
Improve negotiation and allocation on the mixer ports
Add some more SSE optimisations
Move float mixer from the audio dsp to the port
Remove pw_node_get_free_port() and do things more explicitly.
Handle mixer ports in client-node
2018-07-31 12:23:35 +02:00
Wim Taymans
0d148654c0 stream: add more timing info
Keep track of queued data in the stream
Pass delay field around to make it possible to know about the raw
software read/write pointer and the hardware one.
Start stream position at 0
2018-07-19 13:30:27 +02:00
Wim Taymans
d3c203b744 spa: use clock info
Use the port clock io area to get timing info and use this as
the time in the graph when we wake up.
2018-07-17 17:37:55 +02:00
Wim Taymans
fba00fb791 clock: remove clock interface
Remove the clock interface, we need to get timing information with an io
area to get the required precision and performance.
2018-07-17 09:50:51 +02:00
Wim Taymans
e5807cd467 small cleanups 2018-07-13 11:43:06 +02:00
Wim Taymans
79a3b594f9 client-node: set parent id and owner
Make sure we set the right parent id and owner for the client node
and client-stream
Move the remote id in the proxy object and use it in the stream to
get the node id.
2018-07-03 21:43:21 +02:00
Wim Taymans
c315c95e55 link: improve negotiation
Separate negotiation and activation steps of the link.
Keep track of the pending amount of links to negotiate before activating
a node.
2018-07-02 12:14:50 +02:00
Wim Taymans
0122e15611 node: improve scheduling 2018-07-02 12:14:23 +02:00
Wim Taymans
e5629b23f3 client-node: pass position around
Pass the position from server to clients
Implement current time in stream.c using the position info
2018-06-07 11:01:20 +02:00
Wim Taymans
46ad3155b5 module: implement properties 2018-06-01 11:23:02 +02:00
Wim Taymans
ef9fcd1093 node: keep better track of driver node
When a session disappears, try to move nodes to another session.
2018-05-17 17:40:08 +02:00
Wim Taymans
bed26040ef node: add driver position struct
Pass driver info to client
use current buffersize and samplerate in client
update the buffer size dynamically based on session
2018-05-11 10:15:59 +02:00
Wim Taymans
7c4baf88ea link: move all graph nodes 2018-04-30 11:44:20 +02:00
Wim Taymans
013b606a89 node: add driver graph field and schedule it for drivers 2018-04-25 15:55:30 +02:00
Wim Taymans
efa35c2911 node: add option to not register a node 2018-04-13 20:05:46 +02:00
Wim Taymans
fa07400c2e port_mix: place io area in separate field
We would like to remove it from the spa_graph_port...
2018-04-13 20:04:22 +02:00
Wim Taymans
11f42d6262 port: add filter to pw_port_for_each_filtered_param 2018-04-09 09:33:09 +02:00
Wim Taymans
97547d726f client-node: track io areas per mixer 2018-04-03 16:29:36 +02:00
Wim Taymans
a7341ce583 node: fix support for remote driver nodes 2018-04-03 16:29:36 +02:00
Wim Taymans
33a322b96e graph: new scheduling model
Make explicit links between elements that are used to activate the
next element in the graph.
Make subgraphs a special regular node. Make a link from the
subgraph children to the parent so that the subgraph completes when
all the children completed.
Implement a single process function in plugins
Remove many messages in the client node
2018-04-03 16:29:36 +02:00
Wim Taymans
3a9df8096b WIP add subgraph 2018-04-03 16:29:36 +02:00
Wim Taymans
933635f63f WIP: work on per driver graphs
Make a graph per driver node and let nodes that link to this join this
graph
Work on an idea for an even simpler scheduling mechanism.
2018-04-03 16:29:36 +02:00
Wim Taymans
dc091c7c00 node: remove old code 2018-04-03 16:29:36 +02:00