Commit graph

6266 commits

Author SHA1 Message Date
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
60177646e9 examples: remove some unused types 2018-02-09 12:03:28 +01:00
Wim Taymans
c0f8f811e8 node: fix adding ports 2018-02-09 11:58:12 +01:00
Wim Taymans
2198cbe00f node: only remove from graph when added 2018-02-09 11:57:52 +01:00
Wim Taymans
d841e0f778 pipewiresrc: use the right allocator for dmabuf
Use the dmabuf allocator when we get dmabuf memory.
https://github.com/PipeWire/pipewire/issues/31
2018-02-08 12:24:23 +01:00
Wim Taymans
f049d3dc7f Fix compiler issues with c++ 2018-02-08 10:49:08 +01:00
Wim Taymans
72e98dc74a load rtkit module by default 2018-02-08 10:04:13 +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
06ba8c9a7e export-sink: change contrast property 2018-02-07 18:16:01 +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
9225ec29f2 control: emit linked/unlinked event on both controls 2018-02-07 11:56:00 +01:00
Wim Taymans
f9237eb0db control: keep track of linked controls
Keep track of what controls are linked together.
Clean up links on destroy.
Implement unlink, reset io area.
Add events for control link/unlink
2018-02-07 11:52:55 +01:00
Wim Taymans
935efffe0e deviceprovider: only create devices once
We can get many info updates from a device. Only create the device
once and ignore the other updates.
2018-02-06 16:12:31 +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
bd1fea49c2 node: add enabled state
Add method to enable/disable a node. Disabled nodes will SUSPEND and not
be available for automatic connections, it is intented for handling
the monitor node state.
2018-01-30 15:05:23 +01:00
Wim Taymans
8882b2316e remote: add get_properties method 2018-01-30 14:50:46 +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
b5f9983c4e properties: add method to parse key=value list 2018-01-27 11:46:15 +01:00
maxice8
1e411bfe09 pipewire/private.h: add missing sys/types.h for pthread_t 2018-01-27 07:40:04 +01:00
Emmanuele Bassi
a52ba92378 build: Use mathlib for the libm dependency object
The libm variable is defined in `spa`, but the top-level meson.build
defines mathlib.
2018-01-26 08:51:38 +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
5df5afd0a9 module: load and register in one go
Load and register the module in one go because we need to have the
global set when calling the init function so that factories and nodes
can use this as the parent global.
Set the name in the global properties.
2018-01-23 15:25:48 +01:00
Wim Taymans
1ed63e7ba0 add commented line for bluez5 monitor 2018-01-23 13:16:47 +01:00
Jonas Ådahl
f2aafffb2c gstpipewiresrc: Add fd parameter
Will be passed to a pw_remote_connect_fd() instead of plain a
pw_remote_connect() call.
2018-01-23 10:19:25 +01:00
Wim Taymans
3c9eb13500 video-src: set buffer size 2018-01-22 10:35:19 +01:00
Wim Taymans
4851a827f4 video-play: add example of steal_fd 2018-01-19 18:00:45 +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
527f4683ba pipewiresink: add fd property
Add fd property to connect with a given fd
2018-01-19 17:54:47 +01:00
Wim Taymans
8da8dbe025 core: add some core properties to the global 2018-01-19 16:10:32 +01:00
Wim Taymans
4384097227 factory: set fixed properties as global properties 2018-01-19 13:37:24 +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
Wim Taymans
a79e8923b5 link: remove obsolete cleanup code
Whe the port is destroyed, we destroy the link and perform the
cleanup aleady in the destroy.
2018-01-19 13:08:58 +01:00
Wim Taymans
04f77d2565 global: only unregister when it was registered 2018-01-19 11:31:05 +01:00
Wim Taymans
c593d868fb global: add properties
Add properties to global objects to make it easier to select what
nodes and objects to bind too. They can also be used to implement
permissions on the globals based on properties.
Add more error handling in _register.
Make more functions return a result code.
Make a separate pw_module_register, like all other objects.
2018-01-19 11:27:54 +01:00
Wim Taymans
47dd97049c examples: also handle SDL events in main-thread 2018-01-18 15:49:56 +01:00
David Svensson Fors
0b523e4334 SDL examples: all SDL operations in one thread
Fix video in SDL examples by invoking rendering in the same thread
(pw_loop) that created the window, renderer and texture.

At least on some systems, no video is shown without this patch. In
those error cases, SDL_RenderPresent triggers an SDL error "The
specified window has not been made current". That, in turn, has to do
with how SDL uses the current thread for determing the current window.
In general, the page linked to below states that the SDL API is not
designed to be used from multiple threads.

Reference: https://wiki.libsdl.org/CategoryRender
2018-01-18 15:43:46 +01:00
Wim Taymans
0eb44b340a link: use DISABLED flag on port of inactive links
Don't unlink the ports of an inactive link because then it might be
possible that the scheduler can't recycle a buffer, instead use
a port flag to mark the ports disabled and change to scheduler to
skip those ports.
2018-01-18 15:39:03 +01:00
Wim Taymans
a8fa4383a1 mixer: also install mixer on new nodes 2018-01-18 12:49:01 +01:00
Wim Taymans
d50037c2f7 global: separate create and register
That way we can place the global in the wrapped object before we
emit the new_global object and have things work better.
2018-01-18 12:47:44 +01:00
Wim Taymans
67b06d4ad2 core: remove create-link
Make a link factory and use create-object to make links. That way
we can have different kinds of links based on the factory and we
can also hide the factory when link creation should be blocked.
2018-01-16 16:53:08 +01:00
Wim Taymans
f1345f91a8 spa-node: pass properties to plugin init func 2018-01-16 16:51:24 +01:00
Wim Taymans
21aad20f94 node-factory: activate elements 2018-01-16 16:50:53 +01:00
Wim Taymans
4a57f88345 link: fix param enumeration
When we have no input parameter we always need to use NULL as the
filter for the output parameter.
2018-01-11 10:16:40 +01:00
Wim Taymans
79129f81a7 export-source: allow more formats and channels 2018-01-11 10:15:51 +01:00