When we clear the buffers on an output port when we clear the port
format in suspend, also clear the buffers shared by the peer input
port mixers because else they would reference old stale buffers.
Fixes#2914
Incompatible changes between ROC v0.1.X and v0.2.X require
adjusting the ROC modules' code. The largest change is going
from `roc_address` to `roc_endpoint`. There is also a breaking
change, the removal of `local.ip` parameter from module-roc-sink
as `roc_sender_bind()` has been removed.
The API usage was modelled after https://github.com/roc-streaming/roc-pulse
See #1757Fixes#2911
Add a `fd` property to `GstPipeWireDeviceProvider` so it can be used
with fds obtained from e.g. the camera xdg-desktop-portal.
This is needed so apps like Cheese or Camera can easily implement the
camera portal.
Quoting the commit introducing `GstPipeWireCore`:
```
Make all sources in the same process with the same fd share the
connection to the server. This makes it possible to set the same
fd on multiple sources/sinks and have them all use the same
connection, like when capturing multiple monitors from screencast
with the portal.
```
Do the same for `GstPipeWireDeviceProvider`, so it can share a
connection with device sinks as well. This will be needed for fd based
connections introduced in the next commit.
Further more it allows some cleanups.
1: 70652d1a37
Add support for PIPEWIRE_DEBUG=3,foo.bar:5 to set a global log level in
addition to specific topics.
Previously it would have to be done with *:3,foo.bar:5, which would not
really set a global level but all topics to the custom level of 3.
The function was broken since the log topics were added.
Use the logger to init a topic with the given name and check if
there was a custom level for the topic.
Add a new config section that can contain a set of commands to run after
starting.
There is only load-module available now but it can be used to remove the
dependency on pactl when starting the server.
Operating on the assumption that every SPA handle
can reference any other older SPA handle, the only
safe destruction order is from youngest to oldest.
To achieve this, store all handles across all plugins
sorted by age (youngest first), and use that as the
order of destruction in `pw_deinit()`.
This line of thinking does not account for what happens
when a handle that is referenced by others is unloaded,
but it does not make that case worse either.
See #2881
Only enable pulse.idle.timeout for selected applications
(speech-dispatcher) and let other applications be. We can also
lower the minreq and min-quantum of speech-dispatcher now.
Fixes#2880
Imagine this case with pw-loopback:
- the output stream is created and connected
- the input stream is created and connected
- the output stream is linked first and input+output move to the
sink as the driver. Start is sent to input+output but delayed
for the driver until all is complete.
- the input stream is linked to a source. The source becomes the
new driver and input+output+sink is moved to the source.
- all completes, the source is sent the Start command because it is
a driver. The sink also completes but is not sent a Start Command
because it is no longer a driver.
-> sink is scheduled but not started and gives errors
This patch clears the pending state of a driver when it is no longer
a driver. This makes the new driver set a new state (and cancel the
old state) and all followers will start correctly.
Connect the playback stream before the capture stream since the capture
stream can otherwise trigger playback_process() before the playback node
has been activated.
Modules echo-cancel, filter-chain and loopback may print errors if no
applicable target nodes exist when they start up. For our products this
is not considered error/warning worthy, since the issue will resolve
itself once the target nodes exist.
We don't need to pass the client to the module create and load
functions, they can work without a client.
The only place the client is used is to access the properties to make a
new connection to pipewire. This is also however not a good idea, we
should simply use the defaults used by the context or else a client
could set strange properties like remote.name etc for these internal
connections.
Also removing the dependency of the client will make it possible to load
modules from the startup script or other modules later.
Many Gstreamer elements support transforming buffers via the
`image-orientation` tag. Use it to implement support for the new
VideoTransform meta.
In order for Gstreamer pipelines to enable support for these tags
usually the rotate method has to be set to `auto` or `automatic`,
e.g. `videoflip method=automatic`, `glimagesink rotate-method=automatic`
or `waylandsink rotate-method=auto`.
Also try to recycle a buffer if the current buffer_id is invalid.
Ignore -EPIPE from the sender, just ask for more data. -EPIPE is when
the sende runs out of buffers so in that case we need to recycle one
as well.
Fixes#2874
Wait for all pending Start commands from the followers to complete
before adding and starting the driver node.
This ensure that all links are set up and the nodes have received and
replied to the Start command and things can start without hickups.