pub struct Cast {
pub stream_id: u64,
pub session_id: u64,
pub kind: CastKind,
pub target: CastTarget,
pub is_dynamic_target: bool,
pub is_active: bool,
pub pid: Option<i32>,
pub pw_node_id: Option<u32>,
}Expand description
A screencast.
Fields§
§stream_id: u64Stream ID of the screencast that uniquely identifies it.
session_id: u64Session ID of the screencast.
A session can have multiple screencast streams. Then multiple Casts will have the same
session_id. Though, usually there’s only one stream per session.
Do not confuse session_id with stream_id.
kind: CastKindKind of this screencast.
target: CastTargetTarget being captured.
is_dynamic_target: boolWhether this is a Dynamic Cast Target screencast.
Meaning that actions like SetDynamicCastWindow will act on this screencast.
Keep in mind that the target can change even if this is false.
is_active: boolWhether the cast is currently streaming frames.
This can be false for example when switching away to a different scene in OBS, which
pauses the stream.
pid: Option<i32>Process ID of the screencast consumer, if known.
Currently, only wlr-screencopy screencasts can have a pid.
pw_node_id: Option<u32>PipeWire node ID of the screencast stream.
This is None for wlr-screencopy casts, and also for PipeWire casts before the node is
created (when the cast is just starting up).