Skip to main content

CaptureTarget

Struct CaptureTarget 

Source
pub struct CaptureTarget { /* private fields */ }

Implementations§

Source§

impl CaptureTarget

Source

pub fn kind(&self) -> TargetKind

Source

pub fn id(&self) -> &Arc<str> ⓘ

Source

pub fn logical_id(&self) -> &str

Source

pub fn pid(&self) -> Option<u32>

Source

pub fn process_start_time(&self) -> Option<u64>

Source

pub fn app_id(&self) -> Option<&Arc<str>>

Source

pub fn device_id(&self) -> Option<&Arc<str>>

Source

pub fn clean_device_id(&self) -> Option<&str>

Source

pub fn name(&self) -> Option<&Arc<str>>

Source

pub fn executable_path(&self) -> Option<&Arc<str>>

Source

pub fn active_audio(&self) -> Option<bool>

Source

pub fn scope(&self) -> ProcessScope

Source

pub fn on_root_exit(&self) -> OnRootExit

Source

pub fn default_device_mode(&self) -> DefaultDeviceMode

Source

pub fn backend(&self) -> Option<BackendId>

Source

pub fn available_backends(&self) -> &Arc<[BackendId]> ⓘ

Source

pub fn gain(&self) -> f32

Source

pub fn diagnostic_summary(&self, options: DiagnosticOptions) -> String

Source

pub fn process( identity: ProcessIdentity, scope: ProcessScope, on_root_exit: OnRootExit, ) -> Result<CaptureTarget, PlanError>

Source

pub fn application( identity: ProcessIdentity, app_id: Option<Arc<str>>, name: Option<Arc<str>>, executable_path: Option<Arc<str>>, scope: ProcessScope, on_root_exit: OnRootExit, ) -> Result<CaptureTarget, PlanError>

Source

pub fn device( device_id: impl Into<Arc<str>>, ) -> Result<CaptureTarget, PlanError>

Source

pub fn input_device( device_id: impl Into<Arc<str>>, ) -> Result<CaptureTarget, PlanError>

Source

pub fn default_output(default_device_mode: DefaultDeviceMode) -> CaptureTarget

Source

pub fn microphone(default_device_mode: DefaultDeviceMode) -> CaptureTarget

Source

pub fn default_input(default_device_mode: DefaultDeviceMode) -> CaptureTarget

Source

pub fn with_backend(self, backend: BackendId) -> CaptureTarget

Source

pub fn with_optional_backend(self, backend: Option<BackendId>) -> CaptureTarget

Source

pub fn with_available_backends( self, backends: impl Into<Arc<[BackendId]>>, ) -> CaptureTarget

Source

pub fn with_scope(self, scope: ProcessScope) -> CaptureTarget

Source

pub fn with_on_root_exit( self, on_root_exit: OnRootExit, ) -> Result<CaptureTarget, PlanError>

Source

pub fn with_default_device_mode(self, mode: DefaultDeviceMode) -> CaptureTarget

Source

pub fn with_name(self, name: Option<Arc<str>>) -> CaptureTarget

Source

pub fn with_active_audio(self, active_audio: Option<bool>) -> CaptureTarget

Source

pub fn with_process_identity( self, identity: ProcessIdentity, ) -> Result<CaptureTarget, PlanError>

Source

pub fn resolve_pinned_endpoint( &self, default_output_id: Option<&str>, default_input_id: Option<&str>, ) -> CaptureTarget

Resolve DefaultOutput(Pin) or DefaultInput(Pin) to a concrete Device / InputDevice while preserving gain, backend, and available_backends invariants.

Source

pub fn with_metadata( self, app_id: Option<Arc<str>>, name: Option<Arc<str>>, executable_path: Option<Arc<str>>, active_audio: Option<bool>, ) -> CaptureTarget

Source

pub fn with_gain(self, gain: f32) -> Result<CaptureTarget, PlanError>

Source

pub fn process_identity(&self) -> Option<ProcessIdentity>

Source

pub fn lower_to_process(&self) -> Result<CaptureTarget, PlanError>

Source

pub fn match_identity_key(&self) -> Option<u64>

Source

pub fn validate(&self) -> Result<(), PlanError>

Trait Implementations§

Source§

impl Clone for CaptureTarget

Source§

fn clone(&self) -> CaptureTarget

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CaptureTarget

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl PartialEq for CaptureTarget

Source§

fn eq(&self, other: &CaptureTarget) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CaptureTarget

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.