Struct ashpd::desktop::screencast::ScreenCastProxy [−][src]
pub struct ScreenCastProxy<'a>(_);
Expand description
The interface lets sandboxed applications create screen cast sessions.
Implementations
Create a new instance of ScreenCastProxy
.
Create a screen cast session.
Open a file descriptor to the PipeWire remote where the screen cast streams are available.
Returns a file descriptor of an open PipeWire remote.
Arguments
session
- ASessionProxy
.
pub async fn select_sources(
&self,
session: &SessionProxy<'_>,
cursor_mode: BitFlags<CursorMode>,
types: BitFlags<SourceType>,
multiple: bool
) -> Result<(), Error>
pub async fn select_sources(
&self,
session: &SessionProxy<'_>,
cursor_mode: BitFlags<CursorMode>,
types: BitFlags<SourceType>,
multiple: bool
) -> Result<(), Error>
Configure what the screen cast session should record. This method must be called before starting the session.
Passing invalid input to this method will cause the session to be closed. An application may only attempt to select sources once per session.
Arguments
session
- ASessionProxy
.cursor_mode
- Sets how the cursor will be drawn on the screen cast stream.types
- Sets the types of content to record.multiple
- Sets whether to allow selecting multiple sources.
pub async fn start(
&self,
session: &SessionProxy<'_>,
identifier: WindowIdentifier
) -> Result<Vec<Stream>, Error>
pub async fn start(
&self,
session: &SessionProxy<'_>,
identifier: WindowIdentifier
) -> Result<Vec<Stream>, Error>
Start the screen cast session.
This will typically result the portal presenting a dialog letting the
user do the selection set up by select_sources
.
An application can only attempt start a session once.
Arguments
session
- ASessionProxy
.identifier
- Identifier for the application window.
Available cursor mode.
Available source types.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ScreenCastProxy<'a>
impl<'a> Send for ScreenCastProxy<'a>
impl<'a> Sync for ScreenCastProxy<'a>
impl<'a> Unpin for ScreenCastProxy<'a>
impl<'a> !UnwindSafe for ScreenCastProxy<'a>