pub struct MicrophoneView {
pub id: String,
pub label: String,
pub is_default: bool,
pub channels: u8,
pub sample_rate_hz: u32,
pub native_id: String,
}Expand description
View-model shape for the microphone-list IPC command (M-MIC.1 /
AUT-278). Mirrors [media::MicrophoneDevice] but lives in
crates/app/ so the IPC schema is owned by the shell crate.
Same shape contract as CameraView keeps the Leptos-side
picker code symmetrical between camera + mic.
Fields§
§id: StringStable device id (mic-…).
label: StringHuman-readable label ("MacBook Pro Microphone" etc.).
is_default: booltrue for the OS-default mic.
channels: u8Native channel count from the gst caps line (1 = mono, 2 =
stereo). 0 means unknown — Leptos should default to 2.
sample_rate_hz: u32Native sample rate (typically 48000 / 44100). 0 means
unknown — Leptos should default to 48000.
native_id: StringPlatform-native device identifier (M-MIC.3 / AUT-284).
Round-tripped back through start_mic_capture so the worker
can route it into the per-OS gst element (osxaudiosrc device-uid=… etc.). Empty when the underlying gst plugin
didn’t expose unique-id for this device — the worker
falls back to autoaudiosrc in that case.
Trait Implementations§
Source§impl Clone for MicrophoneView
impl Clone for MicrophoneView
Source§fn clone(&self) -> MicrophoneView
fn clone(&self) -> MicrophoneView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MicrophoneView
impl Debug for MicrophoneView
Source§impl<'de> Deserialize<'de> for MicrophoneView
impl<'de> Deserialize<'de> for MicrophoneView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<MicrophoneDevice> for MicrophoneView
impl From<MicrophoneDevice> for MicrophoneView
Auto Trait Implementations§
impl Freeze for MicrophoneView
impl RefUnwindSafe for MicrophoneView
impl Send for MicrophoneView
impl Sync for MicrophoneView
impl Unpin for MicrophoneView
impl UnsafeUnpin for MicrophoneView
impl UnwindSafe for MicrophoneView
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more