After we drained, set the io state to NEED_DATA again. This will
trigger a new _process callback, if we have new buffers we will
exit the drain state and produce more data, if we have no buffers we
reenter the drained state and signal the drained event.
This effectively provides a way to exit the drain state by pushing
a new buffer into the stream.
/run/pipewire is initially created by pipewire.socket when it creates
the socket file, but it is owned by root with mode 0755.
In the .service unit, RuntimeDirectory=pipewire re-creates /run/pipewire
for user pipewire (owned by pipewire:pipewire, 0755) when this unit starts.
This is necessary for the pipewire daemon to be able to write the .lock file.
By default, when the service unit stops, systemd deletes this runtime
directory and therefore it also deletes the socket that is owned by
pipewire.socket. When this happens, the service is no longer
socket-activateable even though pipewire.socket is active.
RuntimeDirectoryPreserve=yes prevents the service unit from removing
this runtime directory and socket activation still works as expected
When running pipewire as a system-wide daemon, module-portal
obviously doesn't load. Make it optional so that the default
config doesn't fail in system-wide mode
1) detect port changes
2) restore or save port changes
3) if port changes:
check and restore the best profile
else check and restore the best ports
4) if profile changed, check and restore best ports
See #533
See #708
First check all the routes to see if anything changed. If there is
a change check if we need a profile switch.
Then check all the active routes and restore state when they changed.
Add save property to Profile and Route params to notify the session
manager that they should be saved. Let the session manager only save
the Profile and Routes with the save flag.
Make pulse-server set the save flag on Profile and Route changes.
The result is that we can make a difference between user requested
changes and automatical changes and only remember the user preferences.
When a port changes availability, first check if we need to perform
a profile switch, if not select the new best port.
There is no need to copy the properties, just pass ownership.
Make sure to always have properties for the server. Ensure we
clean up properties on error.
We can only handle PCM encodings for now, fail conversion otherwise.
If we have no supported formats, return an error code.
VLC first try to send AC3 or EAC3 passthrough and then tries again
with decoded data. If we accept the encoded data we are just playing
noise.
Fixes#428
Use log.level from the config file if not otherwise set with
PIPEWIRE_DEBUG env.
Make client log.level = 0 by default to avoid spamming the console
with errors.
Fixes#725Fixes#769
Ignore property updates for keys that we manage ourselves like the
object.id, node.id etc. Otherwise a client can replace this with
their local ids and cause confusion.