Function ashpd::desktop::camera::pipewire_streams
source ยท pub async fn pipewire_streams(fd: OwnedFd) -> Result<Vec<Stream>, Error>
Available on crate feature
pipewire
only.Expand description
A helper to get a list of PipeWire streams to use with the camera file
descriptor returned by Camera::open_pipe_wire_remote
.
Currently, the camera portal only gives us a file descriptor. Not passing a node id may cause the media session controller to auto-connect the client to an incorrect node.
The method looks for the available output streams of a media.role
type of
Camera
and return a list of Stream
s.
Note The socket referenced by fd
must not be used while this function is
running.