Commit graph

1044 commits

Author SHA1 Message Date
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
95b3cba3c3 audiomixer: only overwrite OK status
When the mixer has no bytes queued, only ask for more bytes when
we were in the OK status otherwise we might override the HAVE_BUFFER
status and discard the queued buffer.
2018-01-30 14:53:38 +01:00
Wim Taymans
01d8fdc1bf graph: reset counters before checking peers 2018-01-30 14:51:18 +01:00
Wim Taymans
8882b2316e remote: add get_properties method 2018-01-30 14:50:46 +01:00
Wim Taymans
0a8e6b5dba config.h: add version numbers 2018-01-30 14:49:45 +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
maxice8
214babe7b9 param/meta.h: add missing fcntl.h include for off_t 2018-01-27 07:40:04 +01:00
Emmanuele Bassi
ea28338736 build: Optional tools should not be mandatory
Since we're using the `found()` method on tools found via the
`find_program()` function, we are expecting them to be optional,
but we are not passing `required:false` to ensure that Meson does
not bail out when the tool is not found.
2018-01-26 08:51:38 +01:00
Emmanuele Bassi
d99f5defa3 build: Fix dependency objects for system libraries
The dependency checks for system libraries is not really portable.

Not all C standard libraries have separate rt and math libraries, so the
requirement should be set to false.

Additionally, finding threading libraries should be left to Meson
itself, using the `dependency('threads')` object, which will do the
right thing depending on platform and compiler.
2018-01-26 08:51:38 +01:00
Emmanuele Bassi
f9ed917814 build: Do not redefine dependency objects
Use the top-level ones.
2018-01-26 08:51:38 +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
1804e47a91 a2dp-codecs: also define functions for big endian 2018-01-23 16:23:39 +01:00
Wim Taymans
afae27b4cc don't build bluez when sbc is missing 2018-01-23 16:06:54 +01:00
Wim Taymans
cf036a15f0 Release 0.1.8 2018-01-23 15:58:36 +01:00
Wim Taymans
54a6086e45 command: add more commands 2018-01-23 15:54:56 +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
865f671195 audiomixer: fix EnumFormat
When a format is set on one of the ports, only return that format
from EnumFormat.
2018-01-18 15:41:47 +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
155243a27c spa: simplify start/pause
Use the sync option in invoke to implement stop.
2018-01-18 11:57:23 +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
7d5f302f93 Add bluez5 plugins 2018-01-16 15:19:55 +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
Wim Taymans
f24ee7fd02 debug: print to stderr 2018-01-11 10:14:26 +01:00
Wim Taymans
690f6ca372 module: improve error reporting 2017-12-18 13:17:02 +01:00