Wim Taymans
903cbeb7c1
hook: handle port and factory implementation with hook
...
This way we can also handle the version number.
2019-05-14 18:08:02 +02:00
Wim Taymans
23d4ed62dd
device: rename internal variable for consistency with node
2019-05-14 18:06:48 +02:00
Wim Taymans
29164a0f54
link: remove error from method
...
We return a reason in errno
2019-05-14 12:59:18 +02:00
Wim Taymans
2889db8efb
link: listen to permission changes on the ports
...
If one of the ports becomes invisible to a client, hide the link.
If one of the ports is owned by a client and the peer port becomes
invisible for the client, destroy the link.
2019-05-14 12:09:34 +02:00
Wim Taymans
d7c7e9bf6f
global: update child permissions
...
When the permissions of a global change, update the child permissions
as well.
2019-05-14 12:08:35 +02:00
Wim Taymans
d39d15b0d9
global: keep track of child globals
...
Keep track of the child globals and unregister when the parent
is unregistered.
2019-05-14 12:07:30 +02:00
Wim Taymans
b474666e2e
link: listen for permission changes
...
Destroy the link when the ports or nodes are no longer visible
to the other side of the link.
2019-05-13 18:03:27 +02:00
Wim Taymans
a224234acd
global: don't follow NULL parent
2019-05-13 18:00:50 +02:00
Wim Taymans
79fe89412a
client: update permission before calling global_update
...
first update the permission and then call the global update method. This
ensures that any query of the permissions will have the new permissions.
2019-05-13 17:58:58 +02:00
Wim Taymans
04c153d410
global: add permissions_changed event
2019-05-13 17:24:33 +02:00
Wim Taymans
9221b8dedd
global: combine all permissions of the object tree
...
To get the permissions of an object, combine the permissions
of the object and all the parent nodes up to the root.
This is necessary to enforce that a client can never see and
object id (in this case the parent id) it is not allowed to see.
2019-05-13 17:13:58 +02:00
Wim Taymans
23d0b9e5e2
link: check permissions
...
When creating a link between two nodes, check if the owner of a
node (when it is a client) can see the other node.
2019-05-13 17:11:15 +02:00
Wim Taymans
07ff967285
client: call find_permission only once
2019-05-13 10:14:08 +02:00
Wim Taymans
2d3f30fb96
introspect: fix enum
2019-05-13 10:12:33 +02:00
Wim Taymans
795b14f48b
protocol-native: also handle 0 recvmsg as EOF
...
When recvmsg returns 0, also handle it like an EOF and close to
connection otherwise we keep spinning forever.
2019-05-13 10:10:41 +02:00
Wim Taymans
a2bf4ce96e
protocol: add security label to a client
...
Don't pass the ucred to the client construct, just set the properties
in the protocol.
Use the client properties to get ucred.
Add the security label to the client properties (from SO_PEERSEC)
2019-05-10 13:28:18 +02:00
Wim Taymans
4e70cddf1d
core: don't remove client resource in hello
...
Keep the client resource of a client around and make sure we don't
destroy it in hello.
2019-05-10 12:36:28 +02:00
Wim Taymans
a804b71267
core: destroy all resources on hello
...
Destroy all resources (except the core) for a client when it
does a hello. This typically needs to be done after passing the
connection fd from one client to another.
2019-05-10 11:56:30 +02:00
Wim Taymans
1a7fcaf9c6
Fix cleanup
2019-05-10 11:15:48 +02:00
Wim Taymans
35c2aca706
remote: only remove the proxy id when it existed
2019-05-07 17:53:57 +02:00
Wim Taymans
9a842e4643
pipewiresrc: actually use the fd when set
2019-05-07 14:53:53 +02:00
Wim Taymans
5ac383e7f7
alsa: improve capture slave resync
...
When we underrun, send out a buffer of 0 samples and catch up next
time.
Detect discont in the master and resync.
2019-04-29 10:00:42 +02:00
Wim Taymans
9ec3e3ab6d
private: set min quantum to 32
...
Going as low as 32 is possible now with the better clock rate
estimation.
2019-04-25 13:04:44 +02:00
Wim Taymans
be5e79831c
introspect: remove unused RUNNING state for a link
2019-04-25 12:56:17 +02:00
Wim Taymans
9bfffc009d
core: only follow active nodes
2019-04-25 12:55:31 +02:00
Wim Taymans
f8513029a1
node: cleanup, rename slave list
2019-04-24 16:56:18 +02:00
Wim Taymans
9b1da77bfc
node: remove obsolete enabled state
...
We will create/destroy nodes instead of enabled/disable
2019-04-24 15:39:29 +02:00
Wim Taymans
3b513fa7ae
floatmix: remove some unused code
2019-04-23 17:37:46 +02:00
Wim Taymans
8dabd52807
audio-dsp: use audioconvert to get a resampler
2019-04-23 17:37:22 +02:00
Wim Taymans
bb3da2fcc1
remote-node: reuse activation logic in pw_node
...
Set the received eventfd as the node eventfd and let existing
logic take care of scheduling the node.
2019-04-17 15:23:11 +02:00
Wim Taymans
8b1e5fedc9
core: clear driver on unassigned nodes
2019-04-11 16:40:16 +02:00
Wim Taymans
affc641c71
node: set master flag
...
Set the master flag when a node is selected as master.
Recalc graph when a node is destroyed
2019-04-11 16:38:24 +02:00
Wim Taymans
092a0c660d
make bitfields unsigned
...
Remove driver property from client-node of client-stream.
2019-04-10 17:52:42 +02:00
Wim Taymans
787900e8bf
v4l2: map all jpeg formats to video/mjpeg
2019-04-10 17:10:34 +02:00
Wim Taymans
0db5817ed7
client-stream: Don't allow DYNAMIC_DATA
...
We don't want to use dynamic data for the remote nodes, the buffers
need to keep pointing to the memfd memory.
2019-04-10 16:35:28 +02:00
Wim Taymans
32f039e2e5
core: rework how nodes are added to a driver
...
Add a function to recalculate all nodes associated with a driver by
iterating the graph for each driver node. We used to do this in an
incremental way, which is easy to join graph but expensive to
split.
A full scan simplifies some things and we can't avoid it when we
need to calculate latencies later. It will also simplifies assigning
master and slave roles to drivers when the graphs are joined/split.
When we link/unlink or add/remove nodes, recalc the graph.
2019-04-10 16:19:10 +02:00
George Kiagiadakis
40a5063b9f
module-link-factory: fix wrong goto label
...
harmless, but leads to a wrong error message being printed
2019-04-02 23:26:17 +02:00
George Kiagiadakis
7a7a12138f
module-access: don't leak the fd in check_cmdline
2019-04-02 23:26:05 +02:00
Wim Taymans
5c896fedd5
connection: stop refill when 0 bytes read
2019-04-02 23:02:58 +02:00
Wim Taymans
e7ef13e310
audioconvert: add avx optimizations
2019-03-28 16:45:57 +01:00
Wim Taymans
5a2ccee1ff
Add FASTPATH trace log
...
Add a trace_fp that can be optimized away when FASTPATH is defined.
2019-03-21 11:31:53 +01:00
Wim Taymans
036ca89c0e
audioconvert: mark ports and buffers as DYNAMIC
...
Only passthrough buffer data when the buffer and ports are
marked as DYNAMIC.
Use extra buffer for nodes that keep a ref on buffers (resample).
2019-03-21 10:45:24 +01:00
Wim Taymans
c2cb74a146
protocol-native: fix indentation
2019-03-20 15:57:34 +01:00
Wim Taymans
70e62aacd7
protocol-native: pass a message around
...
Pass a message around to make things more extensible later.
Keep fds per message if we ever want to write individual
messages.
Pass number of fds in the message header. We might need this to
close the fds when the proxy is gone.
2019-03-19 16:15:20 +01:00
Wim Taymans
30747942ac
connection: add more test
2019-03-19 11:58:46 +01:00
Wim Taymans
a3e4726ea6
connection: add test and fix a bug
...
Add a unit test for the connection
When we consumed all packets in a buffer, try to get more data instead
of failing right away.
2019-03-19 11:44:23 +01:00
Wim Taymans
ca051282a4
port: add port subscribe_params
2019-03-18 16:34:07 +01:00
Wim Taymans
ae7e60d790
interfaces: add subscribe params method
...
Add a node subscribe params method that automatically emits the new
params when they change so that we can avoid an enum_params.
Use this in the stream object.
Remove the control messages to update controls in stream, use the
set_param. This is more overhead but allows for notifications to other
clients.
Make it possible to update many controls in one go.
2019-03-18 16:12:27 +01:00
Wim Taymans
b163dc9114
private: define max params
2019-03-18 16:10:36 +01:00
Wim Taymans
3049964031
stream: parse PropInfo and make controls
...
Parse the PropInfo params and make pw_stream_control elements.
Only emit control changes when something changed.
2019-03-18 11:19:08 +01:00