pub enum PlatformStream {
PipeWire(PipeWireStream),
Pulse(PulseStream),
}Expand description
Single-session stream backed by PipeWire or PulseAudio.
Variants§
PipeWire(PipeWireStream)
Pulse(PulseStream)
Implementations§
Source§impl PlatformStream
impl PlatformStream
pub fn open( target: &CaptureTarget, overflow: Overflow, ) -> Result<Self, CapabilityError>
pub fn open_with_options( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, ) -> Result<Self, CapabilityError>
pub fn open_with_permission_policy( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, _permission_policy: PermissionPolicy, ) -> Result<Self, CapabilityError>
Trait Implementations§
Source§impl AudioStreamBackend for PlatformStream
impl AudioStreamBackend for PlatformStream
fn format(&self) -> &Arc<Format> ⓘ
fn trace(&self) -> Option<&Arc<Trace>>
fn control_handle(&self) -> ControlHandle
fn default_cancel(&self) -> Cancellation
fn end_reason(&self) -> Option<EndReason>
fn read_with_cancel( &mut self, frames: usize, timeout: Duration, cancel: Cancellation, ) -> Result<ReadResult, ReadError>
fn read_into_with_cancel( &mut self, destination: &mut [u8], frames: usize, timeout: Duration, cancel: Cancellation, ) -> Result<ReadResult, ReadError>
fn stop(&self, mode: Stop)
fn resources_done(&self) -> bool
fn wait_cleanup(&self, timeout: Duration) -> bool
fn read( &mut self, frames: usize, timeout: Duration, ) -> Result<ReadResult, ReadError>
fn read_into( &mut self, destination: &mut [u8], frames: usize, timeout: Duration, ) -> Result<ReadResult, ReadError>
Source§impl OpenableStreamBackend for PlatformStream
impl OpenableStreamBackend for PlatformStream
fn open_with_permission_policy( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, permission_policy: PermissionPolicy, ) -> Result<Self, CapabilityError>
fn open_with_options( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, ) -> Result<Self, CapabilityError>
fn open( target: &CaptureTarget, overflow: Overflow, ) -> Result<Self, CapabilityError>
Auto Trait Implementations§
impl !Freeze for PlatformStream
impl RefUnwindSafe for PlatformStream
impl Send for PlatformStream
impl Sync for PlatformStream
impl Unpin for PlatformStream
impl UnsafeUnpin for PlatformStream
impl UnwindSafe for PlatformStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more