Commit graph

2202 commits

Author SHA1 Message Date
Wim Taymans
857b2a0cfb spa: add result type
We need this to know the type of result, especially when serializing.
2019-05-28 13:59:48 +02:00
Wim Taymans
5299677f88 add const to spa_event and spa_command 2019-05-28 13:51:12 +02:00
Wim Taymans
4661ee882c spa-monitor: remove device when destroyed
Remove the device from our list when it got destroyed.
2019-05-27 16:02:36 +02:00
Wim Taymans
973a92b49d device: add free signal 2019-05-27 15:58:50 +02:00
Wim Taymans
891bb49dfb core: fix destroy order
Improve destroy order, destroy children before parents.
2019-05-27 15:37:01 +02:00
Wim Taymans
51d1569114 stream: fix internal method call 2019-05-24 17:16:25 +02:00
Wim Taymans
428cb5de75 port: ignore not implemented mixer methods 2019-05-24 16:50:48 +02:00
Wim Taymans
a680f434d2 port: use right properties
Use format.dsp as a key to mark the dsp format on a port
Use audio.channel as the key to set the audio channel on a port
2019-05-24 16:14:19 +02:00
Wim Taymans
3ad73f0532 keys: add keys.h with defines and docs
Add a keys.h file that lists and documents all keys available to
be used in properties.
2019-05-24 15:47:48 +02:00
Wim Taymans
ff946e3d4b interface: add an interface struct
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-23 12:59:24 +02:00
Michael Olbrich
c79a30bd8a gstpipewiresrc: clear timestamps when processing a buffer
This is necessary for 'do-timestamp' to work if the source provides no
timestamps. Without this, the timestamp from the first use will remain,
because the basesrc only overwrites timestamps that are
GST_CLOCK_TIME_NONE.
2019-05-23 10:15:43 +02:00
Wim Taymans
e20857ccd1 destroy resources first, then the global
The clients see the proxy disappear before the global is removed.
2019-05-23 10:11:56 +02:00
Wim Taymans
f57a806cf8 Return -EEXIST when registering an object twice 2019-05-23 10:00:23 +02:00
Wim Taymans
fbf6acd271 list: use spa_list_consume some more
If we know the item is removed in each iteration, _consume can handle
deletion of any item while being iterated.
2019-05-23 09:56:02 +02:00
Wim Taymans
58fa5561b8 interface: get_registry always returns a Registry type 2019-05-21 15:46:31 +02:00
Wim Taymans
a564d9f3f1 Move implementation helpers to utils 2019-05-20 10:14:00 +02:00
Wim Taymans
b195a25636 pipewire: only load spa_handle
Only provide a method to load a spa_handle, getting the interface
from that is easy and we only use refcounting on the handle.
2019-05-20 09:49:39 +02:00
Wim Taymans
da9f0ed160 core: simply load the dbus interface in core 2019-05-17 17:33:15 +02:00
Michael Olbrich
4be788962e core: fix pw_core_find_format() for active ports
pw_core_find_format() is currently broken when one of the ports is already
active: The format of the active port is used and the other port is
completely ignored.
As a result, the autolink module may try to link a new port to the first
already active port even if the formats do not match.

To fix this, use the format of the active port as a filter and enumerate
the formats of the other port.
2019-05-17 12:52:18 +02:00
Jonas Ådahl
b1c193346e pipewire/node: Pass along 'media.role' node property too 2019-05-17 12:42:45 +02:00
Wim Taymans
3cb400bb61 audioconvert: don't use range
Use the spa_io_position->size to decide how many samples to output
from the resampler.
2019-05-17 10:31:20 +02:00
Wim Taymans
c348790ca1 map: handle more error cases 2019-05-15 15:19:25 +02:00
Wim Taymans
448c1937ad hook: separate spa_callbacks from the hook
Make a spa_callbacks with just the functions and data and use this
in the hook and objects.
2019-05-15 12:17:52 +02:00
Wim Taymans
6ee192dff5 hooks: use hook to implement the callbacks
This way we get the version check implemented and save some
code.
2019-05-15 11:19:23 +02:00
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