Skip to main content

PlatformStream

Enum PlatformStream 

Source
pub enum PlatformStream {
    PipeWire(PipeWireStream),
    Pulse(PulseStream),
}
Expand description

Single-session stream backed by PipeWire or PulseAudio.

Variants§

Implementations§

Source§

impl PlatformStream

Source

pub fn open( target: &CaptureTarget, overflow: Overflow, ) -> Result<Self, CapabilityError>

Source

pub fn open_with_options( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, ) -> Result<Self, CapabilityError>

Source

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

Source§

fn format(&self) -> &Arc<Format> ⓘ

Source§

fn trace(&self) -> Option<&Arc<Trace>>

Source§

fn control_handle(&self) -> ControlHandle

Source§

fn default_cancel(&self) -> Cancellation

Source§

fn end_reason(&self) -> Option<EndReason>

Source§

fn read_with_cancel( &mut self, frames: usize, timeout: Duration, cancel: Cancellation, ) -> Result<ReadResult, ReadError>

Source§

fn read_into_with_cancel( &mut self, destination: &mut [u8], frames: usize, timeout: Duration, cancel: Cancellation, ) -> Result<ReadResult, ReadError>

Source§

fn stop(&self, mode: Stop)

Source§

fn resources_done(&self) -> bool

Source§

fn wait_cleanup(&self, timeout: Duration) -> bool

Source§

fn read( &mut self, frames: usize, timeout: Duration, ) -> Result<ReadResult, ReadError>

Source§

fn read_into( &mut self, destination: &mut [u8], frames: usize, timeout: Duration, ) -> Result<ReadResult, ReadError>

Source§

impl OpenableStreamBackend for PlatformStream

Source§

fn open_with_permission_policy( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, permission_policy: PermissionPolicy, ) -> Result<Self, CapabilityError>

Source§

fn open_with_options( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, ) -> Result<Self, CapabilityError>

Source§

fn open( target: &CaptureTarget, overflow: Overflow, ) -> Result<Self, CapabilityError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.