Skip to main content

parse_device_monitor_output

Function parse_device_monitor_output 

Source
pub fn parse_device_monitor_output(text: &str) -> Vec<MicrophoneDevice>
Expand description

Pure-Rust parser for gst-device-monitor-1.0 Audio/Source text output. Split out from list_microphones so the parser is testable against captured fixtures without needing gst installed.

Resolution rule for MicrophoneDevice::is_default:

  1. If any device’s properties: block contains is-default = true, that device alone wins the flag.
  2. Otherwise the first-listed device is marked default — same fallback shape as crate::camera::parse_device_monitor_output.