Struct libpulse_binding::context::introspect::SinkPortInfo [−][src]
pub struct SinkPortInfo<'a> {
pub name: Option<Cow<'a, str>>,
pub description: Option<Cow<'a, str>>,
pub priority: u32,
pub available: PortAvailable,
pub availability_group: Option<Cow<'a, str>>,
pub type: DevicePortType,
}
Expand description
Stores information about a specific port of a sink.
Please note that this structure can be extended as part of evolutionary API updates at any time in any new release.
Fields
name: Option<Cow<'a, str>>
Name of this port.
description: Option<Cow<'a, str>>
Description of this port.
priority: u32
The higher this value is, the more useful this port is as a default.
available: PortAvailable
A flag indicating availability status of this port.
availability_group: Option<Cow<'a, str>>
pa_v14
only.An indentifier for the group of ports that share their availability status with each other.
This is meant especially for handling cases where one 3.5 mm connector is used for
headphones, headsets and microphones, and the hardware can only tell that something was
plugged in but not what exactly. In this situation the ports for all those devices share
their availability status, and PulseAudio can’t tell which one is actually plugged in, and
some application may ask the user what was plugged in. Such applications should get a list
of all card ports and compare their availability_group
fields. Ports that have the same
group are those that need input from the user to determine which device was plugged in. The
application should then activate the user-chosen port.
May be None
, in which case the port is not part of any availability group (which is the
same as having a group with only one member).
The group identifier must be treated as an opaque identifier. The string may look like an ALSA control name, but applications must not assume any such relationship. The group naming scheme can change without a warning.
Since one group can include both input and output ports, the grouping should be done using
CardPortInfo
instead of SinkPortInfo
, but this field is duplicated also in
SinkPortInfo
(and SourcePortInfo
) in case someone finds that convenient.
type: DevicePortType
pa_v14
only.Port device type.