Prop

Enum Prop 

Source
#[non_exhaustive]
pub enum Prop {
Show 76 variants MediaName, MediaTitle, MediaArtist, MediaCopyright, MediaSoftware, MediaLanguage, MediaFilename, MediaIcon, MediaIconName, MediaRole, FilterWant, FilterApply, FilterSuppress, EventId, EventDescription, EventMouseX, EventMouseY, EventMouseHPos, EventMouseVPos, EventMouseButton, WindowName, WindowId, WindowIcon, WindowIconName, WindowX, WindowY, WindowWidth, WindowHeight, WindowHPos, WindowVPos, WindowDesktop, WindowX11Display, WindowX11Screen, WindowX11Monitor, WindowX11Xid, ApplicationName, ApplicationId, ApplicationVersion, ApplicationIcon, ApplicationIconName, ApplicationLanguage, ApplicationProcessId, ApplicationProcessBinary, ApplicationProcessUser, ApplicationProcessHost, ApplicationProcessMachineId, ApplicationProcessSessionId, DeviceString, DeviceApi, DeviceDescription, DeviceBusPath, DeviceSerial, DeviceVendorId, DeviceVendorName, DeviceProductId, DeviceProductName, DeviceClass, DeviceFormFactor, DeviceBus, DeviceIcon, DeviceIconName, DeviceAccessMode, DeviceMasterDevice, DeviceBufferingBufferSize, DeviceBufferingFragmentSize, DeviceProfileName, DeviceIntendedRoles, DeviceProfileDescription, ModuleAuthor, ModuleDescription, ModuleUsage, ModuleVersion, FormatSampleFormat, FormatRate, FormatChannels, FormatChannelMap,
}
Expand description

Well-known property list keys.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MediaName

For streams: localized media name, formatted as UTF-8. E.g. “Guns’N’Roses: Civil War”.

§

MediaTitle

For streams: localized media title if applicable, formatted as UTF-8. E.g. “Civil War”

§

MediaArtist

For streams: localized media artist if applicable, formatted as UTF-8. E.g. “Guns’N’Roses”

§

MediaCopyright

For streams: localized media copyright string if applicable, formatted as UTF-8. E.g. “Evil Record Corp.”

§

MediaSoftware

For streams: localized media generator software string if applicable, formatted as UTF-8. E.g. “Foocrop AudioFrobnicator”

§

MediaLanguage

For streams: media language if applicable, in standard POSIX format. E.g. “de_DE”

§

MediaFilename

For streams: source filename if applicable, in URI format or local path. E.g. “/home/lennart/music/foobar.ogg”

§

MediaIcon

For streams: icon for the media. A binary blob containing PNG image data

§

MediaIconName

For streams: an XDG icon name for the media. E.g. “audio-x-mp3”

§

MediaRole

For streams: logic role of this media. One of the strings “video”, “music”, “game”, “event”, “phone”, “animation”, “production”, “a11y”, “test”

§

FilterWant

For streams: the name of a filter that is desired, e.g.\ “echo-cancel” or “equalizer-sink”. PulseAudio may choose to not apply the filter if it does not make sense (for example, applying echo-cancellation on a Bluetooth headset probably does not make sense. \since 1.0

§

FilterApply

For streams: the name of a filter that is desired, e.g.\ “echo-cancel” or “equalizer-sink”. Differs from PA_PROP_FILTER_WANT in that it forces PulseAudio to apply the filter, regardless of whether PulseAudio thinks it makes sense to do so or not. If this is set, PA_PROP_FILTER_WANT is ignored. In other words, you almost certainly do not want to use this. \since 1.0

§

FilterSuppress

For streams: the name of a filter that should specifically suppressed (i.e.\ overrides PA_PROP_FILTER_WANT). Useful for the times that PA_PROP_FILTER_WANT is automatically added (e.g. echo-cancellation for phone streams when $VOIP_APP does its own, internal AEC) \since 1.0

§

EventId

For event sound streams: XDG event sound name. e.g.\ “message-new-email” (Event sound streams are those with media.role set to “event”)

§

EventDescription

For event sound streams: localized human readable one-line description of the event, formatted as UTF-8. E.g. “Email from lennart@example.com received.”

§

EventMouseX

For event sound streams: absolute horizontal mouse position on the screen if the event sound was triggered by a mouse click, integer formatted as text string. E.g. “865”

§

EventMouseY

For event sound streams: absolute vertical mouse position on the screen if the event sound was triggered by a mouse click, integer formatted as text string. E.g. “432”

§

EventMouseHPos

For event sound streams: relative horizontal mouse position on the screen if the event sound was triggered by a mouse click, float formatted as text string, ranging from 0.0 (left side of the screen) to 1.0 (right side of the screen). E.g. “0.65”

§

EventMouseVPos

For event sound streams: relative vertical mouse position on the screen if the event sound was triggered by a mouse click, float formatted as text string, ranging from 0.0 (top of the screen) to 1.0 (bottom of the screen). E.g. “0.43”

§

EventMouseButton

For event sound streams: mouse button that triggered the event if applicable, integer formatted as string with 0=left, 1=middle, 2=right. E.g. “0”

§

WindowName

For streams that belong to a window on the screen: localized window title. E.g. “Totem Music Player”

§

WindowId

For streams that belong to a window on the screen: a textual id for identifying a window logically. E.g. “org.gnome.Totem.MainWindow”

§

WindowIcon

For streams that belong to a window on the screen: window icon. A binary blob containing PNG image data

§

WindowIconName

For streams that belong to a window on the screen: an XDG icon name for the window. E.g. “totem”

§

WindowX

For streams that belong to a window on the screen: absolute horizontal window position on the screen, integer formatted as text string. E.g. “865”. \since 0.9.17

§

WindowY

For streams that belong to a window on the screen: absolute vertical window position on the screen, integer formatted as text string. E.g. “343”. \since 0.9.17

§

WindowWidth

For streams that belong to a window on the screen: window width on the screen, integer formatted as text string. e.g. “365”. \since 0.9.17

§

WindowHeight

For streams that belong to a window on the screen: window height on the screen, integer formatted as text string. E.g. “643”. \since 0.9.17

§

WindowHPos

For streams that belong to a window on the screen: relative position of the window center on the screen, float formatted as text string, ranging from 0.0 (left side of the screen) to 1.0 (right side of the screen). E.g. “0.65”. \since 0.9.17

§

WindowVPos

For streams that belong to a window on the screen: relative position of the window center on the screen, float formatted as text string, ranging from 0.0 (top of the screen) to 1.0 (bottom of the screen). E.g. “0.43”. \since 0.9.17

§

WindowDesktop

For streams that belong to a window on the screen: if the windowing system supports multiple desktops, a comma separated list of indexes of the desktops this window is visible on. If this property is an empty string, it is visible on all desktops (i.e. ‘sticky’). The first desktop is 0. E.g. “0,2,3” \since 0.9.18

§

WindowX11Display

For streams that belong to an X11 window on the screen: the X11 display string. E.g. “:0.0”

§

WindowX11Screen

For streams that belong to an X11 window on the screen: the X11 screen the window is on, an integer formatted as string. E.g. “0”

§

WindowX11Monitor

For streams that belong to an X11 window on the screen: the X11 monitor the window is on, an integer formatted as string. E.g. “0”

§

WindowX11Xid

For streams that belong to an X11 window on the screen: the window XID, an integer formatted as string. E.g. “25632”

§

ApplicationName

For clients/streams: localized human readable application name. E.g. “Totem Music Player”

§

ApplicationId

For clients/streams: a textual id for identifying an application logically. E.g. “org.gnome.Totem”

§

ApplicationVersion

For clients/streams: a version string, e.g.\ “0.6.88”

§

ApplicationIcon

For clients/streams: application icon. A binary blob containing PNG image data

§

ApplicationIconName

For clients/streams: an XDG icon name for the application. E.g. “totem”

§

ApplicationLanguage

For clients/streams: application language if applicable, in standard POSIX format. E.g. “de_DE”

§

ApplicationProcessId

For clients/streams on UNIX: application process PID, an integer formatted as string. E.g. “4711”

§

ApplicationProcessBinary

For clients/streams: application process name. E.g. “totem”

§

ApplicationProcessUser

For clients/streams: application user name. E.g. “jonas”

§

ApplicationProcessHost

For clients/streams: host name the application runs on. E.g. “omega”

§

ApplicationProcessMachineId

For clients/streams: the D-Bus host id the application runs on. E.g. “543679e7b01393ed3e3e650047d78f6e”

§

ApplicationProcessSessionId

For clients/streams: an id for the login session the application runs in. On Unix the value of $XDG_SESSION_ID. E.g. “5”

§

DeviceString

For devices: device string in the underlying audio layer’s format. E.g. “surround51:0”

§

DeviceApi

For devices: API this device is access with. E.g. “alsa”

§

DeviceDescription

For devices: localized human readable device one-line description. E.g. “Foobar Industries USB Headset 2000+ Ultra”

§

DeviceBusPath

For devices: bus path to the device in the OS’ format. E.g. “/sys/bus/pci/devices/0000:00:1f.2”

§

DeviceSerial

For devices: serial number if applicable. E.g. “4711-0815-1234”

§

DeviceVendorId

For devices: vendor ID if applicable. E.g. 1274

§

DeviceVendorName

For devices: vendor name if applicable. E.g. “Foocorp Heavy Industries”

§

DeviceProductId

For devices: product ID if applicable. E.g. 4565

§

DeviceProductName

For devices: product name if applicable. E.g. “SuperSpeakers 2000 Pro”

§

DeviceClass

For devices: device class. One of “sound”, “modem”, “monitor”, “filter”

§

DeviceFormFactor

For devices: form factor if applicable. One of “internal”, “speaker”, “handset”, “tv”, “webcam”, “microphone”, “headset”, “headphone”, “hands-free”, “car”, “hifi”, “computer”, “portable”

§

DeviceBus

For devices: bus of the device if applicable. One of “isa”, “pci”, “usb”, “firewire”, “bluetooth”

§

DeviceIcon

For devices: icon for the device. A binary blob containing PNG image data

§

DeviceIconName

For devices: an XDG icon name for the device. E.g. “sound-card-speakers-usb”

§

DeviceAccessMode

For devices: access mode of the device if applicable. One of “mmap”, “mmap_rewrite”, “serial”

§

DeviceMasterDevice

For filter devices: master device id if applicable.

§

DeviceBufferingBufferSize

For devices: buffer size in bytes, integer formatted as string.

§

DeviceBufferingFragmentSize

For devices: fragment size in bytes, integer formatted as string.

§

DeviceProfileName

For devices: profile identifier for the profile this devices is in. E.g. “analog-stereo”, “analog-surround-40”, “iec958-stereo”, …

§

DeviceIntendedRoles

For devices: intended use. A space separated list of roles (see PA_PROP_MEDIA_ROLE) this device is particularly well suited for, due to latency, quality or form factor. \since 0.9.16

§

DeviceProfileDescription

For devices: human readable one-line description of the profile this device is in. E.g. “Analog Stereo”, …

§

ModuleAuthor

For modules: the author’s name, formatted as UTF-8 string. E.g. “Lennart Poettering”

§

ModuleDescription

For modules: a human readable one-line description of the module’s purpose formatted as UTF-8. E.g. “Frobnicate sounds with a flux compensator”

§

ModuleUsage

For modules: a human readable usage description of the module’s arguments formatted as UTF-8.

§

ModuleVersion

For modules: a version string for the module. E.g. “0.9.15”

§

FormatSampleFormat

For PCM formats: the sample format used as returned by pa_sample_format_to_string() \since 1.0

§

FormatRate

For all formats: the sample rate (unsigned integer) \since 1.0

§

FormatChannels

For all formats: the number of channels (unsigned integer) \since 1.0

§

FormatChannelMap

For PCM formats: the channel map of the stream as returned by pa_channel_map_snprint() \since 1.0

Implementations§

Source§

impl Prop

Source

pub fn to_c_str(&self) -> &CStr

Returns the property name to use in a property list.

Source

pub fn to_str(&self) -> &str

Returns the property name as a string. Note that for compatibility with existing PulseAudio implementations, property keys must be null-terminated.

Trait Implementations§

Source§

impl Clone for Prop

Source§

fn clone(&self) -> Prop

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Prop

Source§

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

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

impl Hash for Prop

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Prop

Source§

fn cmp(&self, other: &Prop) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Prop

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Prop

Source§

fn partial_cmp(&self, other: &Prop) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for Prop

Source§

impl Eq for Prop

Source§

impl StructuralPartialEq for Prop

Auto Trait Implementations§

§

impl Freeze for Prop

§

impl RefUnwindSafe for Prop

§

impl Send for Prop

§

impl Sync for Prop

§

impl Unpin for Prop

§

impl UnwindSafe for Prop

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.