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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.