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
Make queueing a codec switch work properly. When receiving the dbus
reply, it should move to latest one. Others should be discarded.
Previously, it instead hit an assert, if there were more than two
queued.
Increase the client name size and try hard not to exceed the client name
size especially when adding the Monitor suffix.
Also avoid some potentially unsafe strncpy.
See #788
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
When we have a rate or channels configured, set this in the hw_params
to restrict the enumeration of the remaining parameters. If we,
for example want 8 channels, some cards restrict the formats in that
case and we don't want to enumerate impossible combinations.
Fixes#782
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.