Commit graph

2305 commits

Author SHA1 Message Date
Wim Taymans
ad6ecf6be8 audio-dsp: use flag to check if buffer is filled
Only produce a filled buffer otherwise produce an empty buffer.
Handle different buffer sizes.
Also link to a mixer
2018-04-03 16:29:36 +02:00
Wim Taymans
a3033ee2b7 client-node: improve debug 2018-04-03 16:29:36 +02:00
Wim Taymans
9758e37279 mixer: add properties
Use the propeties from the sink we are mixing and set Audio/Mixer
as the media.class.
2018-04-03 16:29:36 +02:00
Wim Taymans
b6239fb1ab node: improve scheduling
Don't use the graph scheduler anymore, instead use a more simple
method using the nodes directly. The idea is that when a node
pulls, we walk the graph backwards and collect nodes to process.
Searching stops on a node with output. Then we process the nodes,
each one in turn calling process on the next one when all dependend
nodes are processed. This is quite similar to jack2 and with some
modifications seems to work well for more complicated input/output
patterns.
Set per mix input/output buffers.
Implement mixing in the audio-dsp node.
remote: handle mix ports a little better
2018-04-03 16:29:36 +02:00
Wim Taymans
1f077c7e0a client-node: fix mem_offset of io areas 2018-04-03 16:29:36 +02:00
Wim Taymans
b9880dbd5f Add some more debug 2018-04-03 16:29:36 +02:00
Wim Taymans
2ea9addcf2 port: delegate initialization of mix ports to port 2018-04-03 16:29:36 +02:00
Wim Taymans
319098b4c8 client-node: implement set_io on mixer and regular node 2018-04-03 16:29:36 +02:00
Wim Taymans
28a094a65b client-node: free io_area 2018-04-03 16:29:36 +02:00
Wim Taymans
4f680c224b make per mix port io and buffers
Move the io areas to a separate memory block.
Make per link io areas for the ports
Send per mix port io area and buffers
2018-04-03 16:29:36 +02:00
Wim Taymans
fb7a51c6e7 client-node: fix mem_offset of io areas 2018-03-14 16:00:04 +01:00
Wim Taymans
1b2e73de0c node: export method to update ports 2018-03-14 15:55:35 +01:00
Wim Taymans
153bf51ef1 client-node: safely remove source
Remove the source from the data_loop with invoke to make sure it
really is removed before we destroy the node.

Based on patch by David Svensson Fors <davidsf at axis.com>
2018-03-14 14:52:22 +01:00
Wim Taymans
992f20f805 protocol-native: debug connection after remap 2018-03-01 18:31:56 +01:00
Wim Taymans
ea182ba194 client-node: reference memory with id
Reference the memory with id because it could be relocated.
2018-03-01 18:30:39 +01:00
David Svensson Fors
6365ea18d9 module-node-factory: remove destroyed node from node list 2018-03-01 17:43:19 +01:00
Wim Taymans
135a0a18d8 client-node: track memory for client
Keep track of the memory we sent to the client to only send memory
once and choose better memid values.
2018-03-01 14:46:49 +01:00
Wim Taymans
7bc9230a79 client-node: proxy -> node 2018-03-01 12:13:00 +01:00
Wim Taymans
b91a2a4207 link-factory: don't leak properties 2018-02-27 12:49:22 +01:00
Wim Taymans
760e046dcf client-node: handle port set_io 2018-02-26 16:16:53 +01:00
Wim Taymans
bc669f5def audio-dsp: small cleanups
Fix some compilation errors
implement port cleanup
2018-02-26 16:09:47 +01:00
Wim Taymans
944d205e8e protocol-native: print connection info after remap
Print the connection messages after mapping the ids or else we
can't really make sense of the ids.
2018-02-26 12:36:16 +01:00
Wim Taymans
e2f01c5838 protocol-native: disconnect remote
Disconnect the node and all the streams instead of just changing the
state.
2018-02-26 12:29:02 +01:00
Wim Taymans
6f61ac9357 fix some signed vs unsigned comparisons 2018-02-20 18:19:11 +01:00
Wim Taymans
5f92c152e3 remove module-jack
It's better to make a replacement client library
2018-02-20 18:17:01 +01:00
Wim Taymans
20e0d8b4ea dsp: use format in the port.dsp property 2018-02-20 15:49:10 +01:00
Wim Taymans
58667d6ced params: make method on node and port to enum params
Do not pass the params of the node in the node_info, instead,
make a method to enumerate the params. This makes it possible for
clients to only enumerate what they need and when they need it.
Improve introspection of a port, add the name and properties.
Add an enum_param method on the port that can be used to enumerate
port formats.
Change -monitor and -cli and add support for enum_params on the node
and port.
2018-02-20 10:31:55 +01:00
Wim Taymans
a9a95a4205 audio-dsp: start counting from 1, to match jack ports 2018-02-20 10:01:10 +01:00
Wim Taymans
0e5a1b6327 props: use macro for property alternatives 2018-02-20 09:36:05 +01:00
Wim Taymans
f039238288 audio-dsp: implement buffer size param 2018-02-16 18:15:37 +01:00
Wim Taymans
3db9a44679 dsp: make separate nodes for sinks and sources
Make separate nodes for sinks and sources
Add aliases for ports
2018-02-16 12:02:39 +01:00
Wim Taymans
0173180e78 module-audio-dsp: add dsp module
Add an audio dsp module that adds an interleaver for each audio sink
and only allows 1 buffer size and format on the ports. The idea is that
dsp (pro-audio) nodes can be inserted in this part of the pipeline.
2018-02-15 17:54:08 +01:00
Wim Taymans
6c000229f0 port: add port globals
Expose all ports as globals, linking is then done by specifying
the global id of the ports.
Add method to destroy objects. not much security on this one but
yet but it should allow priviledged clients to kill connections
and other clients etc.
Make events on the global object. Implement the bind with the event,
handle destroy of the globals.
Add link properties
Use append to preserve the order.
2018-02-15 17:49:04 +01:00
Wim Taymans
b86f141273 add more debug info 2018-02-15 11:41:07 +01:00
Wim Taymans
95e27c27ca protocol: signal when connection was closed 2018-02-15 10:49:01 +01:00
Wim Taymans
fdfce79edb connection: return false on read error
Return false to indicate that there is no more data to read or else
we add the -1 to buffer_size and things go wrong..
2018-02-12 17:32:09 +01:00
Wim Taymans
70687e466d client-node: update port properties
Handle port properties
Set the client name
2018-02-09 18:10:51 +01:00
Wim Taymans
9d4b0d8358 dbus: move rtkit to module
Move the rtkit code to a module.
Make sure we don't need to include the dbus headers in the spa dbus
interface. This removes the dependency on dbus.
2018-02-08 10:02:17 +01:00
Wim Taymans
2fe6a8245d control: keep track of prop_id
Keep track of the property id which describes the property
functionality.
Link controls based on the property instead of the param_id.
2018-02-07 17:56:35 +01:00
Wim Taymans
053f251be8 client-node: handle io reset 2018-02-07 17:54:43 +01:00
Wim Taymans
d14c7abe11 protocol: make connect async
Make the protocol client connect call async with a callback when it
completes.
Move the connect methods into separate files, add an empty connect
method that will use the screencast portal to get a pipewire fd.
Use the remote intention to get the connect method.
Add some better error reporting.
2018-01-30 15:11:39 +01:00
Wim Taymans
ad1e5fdc10 monitor: set node enabled state
Let the monitor update the node enabled states when creating
and on change events.
2018-01-30 15:08:44 +01:00
Wim Taymans
cb0811860f jack: add property to select node to link to 2018-01-27 11:46:15 +01:00
Wim Taymans
1361a12094 spa-node: use new function to parse arguments 2018-01-27 11:46:15 +01:00
Wim Taymans
5fbf79a4b2 jack: fix param enum 2018-01-27 11:46:15 +01:00
Wim Taymans
f115646bcd core: remove permission callback
Remove the core permission check callback. We can now use the per
client permission configuration.
Rework the flatpak module to use the permissions. When a client
connects, do the portal call and iterate all globals, updating the
permissions. Also update the permissions of newly added globals.
The client is owner of itself.
2018-01-24 16:17:13 +01:00
Wim Taymans
ff17fb68b5 permissions: use current_client for security checks
Don't pass around the client object but keep track of the current
client in the core object. This way we don't need to add a client
argument to functions and can check security when needed.
2018-01-24 12:04:32 +01:00
Wim Taymans
ab099d09dd permissions: check permissions more
Pass client to some core functions to make it possible to check
permissions when iterating globals.
Check permissions of factory before using it.
Check permissions in link factory, only allow linking of nodes we can
see.
Check permissions in the autolink module, only try to link to nodes
we can see.
Make client permissions update behave like an atomic update of an
unordered set of permissions, which is perhaps a bit more intuitive.
2018-01-24 10:42:40 +01:00
Wim Taymans
1c44629cf9 rework initial connection
Make a steal_fd method on the remote.
Add a hello method that sends the initial core info and types to
the client.
With an explicit method we can do this multiple times when we steal
the fd from a remote and use it to make a new remote.
2018-01-19 17:57:59 +01:00
Wim Taymans
bc35d30407 remote: add _get_fd method
Add a method to get the fd of the connection.
2018-01-19 13:10:11 +01:00