Struct libpulse_binding::stream::FlagSet[][src]

#[repr(transparent)]pub struct FlagSet { /* fields omitted */ }

Flag set.

Implementations

impl FlagSet[src]

pub const NOFLAGS: FlagSet[src]

Flag to pass when no specific options are needed.

pub const START_CORKED: FlagSet[src]

Create the stream corked, requiring an explicit Stream::uncork() call to uncork it.

pub const INTERPOLATE_TIMING: FlagSet[src]

Interpolate the latency for this stream. When enabled, Stream::get_latency() and Stream::get_time() will try to estimate the current record/playback time based on the local time that passed since the last timing info update. Using this option has the advantage of not requiring a whole round trip when the current playback/recording time is needed. Consider using this option when requesting latency information frequently. This is especially useful on long latency network connections. It makes a lot of sense to combine this option with AUTO_TIMING_UPDATE.

pub const NOT_MONOTONIC: FlagSet[src]

Don’t force the time to increase monotonically. If this option is enabled, Stream::get_time() will not necessarily return always monotonically increasing time values on each call. This may confuse applications which cannot deal with time going ‘backwards’, but has the advantage that bad transport latency estimations that caused the time to jump ahead can be corrected quickly, without the need to wait.

pub const AUTO_TIMING_UPDATE: FlagSet[src]

If set timing update requests are issued periodically automatically. Combined with INTERPOLATE_TIMING you will be able to query the current time and latency with Stream::get_time() and Stream::get_latency() at all times without a packet round trip.

pub const NO_REMAP_CHANNELS: FlagSet[src]

Don’t remap channels by their name, instead map them simply by their index. Implies NO_REMIX_CHANNELS.

pub const NO_REMIX_CHANNELS: FlagSet[src]

When remapping channels by name, don’t upmix or downmix them to related channels. Copy them into matching channels of the device 1:1.

pub const FIX_FORMAT: FlagSet[src]

Use the sample format of the sink/device this stream is being connected to, and possibly ignore the format the sample spec contains -- but you still have to pass a valid value in it as a hint to PulseAudio what would suit your stream best. If this is used you should query the used sample format after creating the stream by using Stream::get_sample_spec(). Also, if you specified manual buffer metrics it is recommended to update them with Stream::set_buffer_attr() to compensate for the changed frame sizes.

When creating streams with Stream::new_extended(), this flag has no effect. If you specify a format with PCM encoding, and you want the server to choose the sample format, then you should leave the sample format unspecified in the Info object. This also means that you can’t use Info::new_from_sample_spec(), because that function always sets the sample format.

pub const FIX_RATE: FlagSet[src]

Use the sample rate of the sink, and possibly ignore the rate the sample spec contains. Usage similar to FIX_FORMAT.

When creating streams with Stream::new_extended(), this flag has no effect. If you specify a format with PCM encoding, and you want the server to choose the sample rate, then you should leave the rate unspecified in the Info object. This also means that you can’t use Info::new_from_sample_spec(), because that function always sets the sample rate.

pub const FIX_CHANNELS: FlagSet[src]

Use the number of channels and the channel map of the sink, and possibly ignore the number of channels and the map the sample spec and the passed channel map contains. Usage similar to FIX_FORMAT.

When creating streams with Stream::new_extended(), this flag has no effect. If you specify a format with PCM encoding, and you want the server to choose the channel count and/or channel map, then you should leave the channels and/or the channel map unspecified in the Info object. This also means that you can’t use Info::new_from_sample_spec(), because that function always sets the channel count (but if you only want to leave the channel map unspecified, then Info::new_from_sample_spec() works, because the channel map parameter is optional).

pub const DONT_MOVE: FlagSet[src]

Don’t allow moving of this stream to another sink/device. Useful if you use any of the Fix* flags and want to make sure that resampling never takes place -- which might happen if the stream is moved to another sink/source with a different sample spec/channel map.

pub const VARIABLE_RATE: FlagSet[src]

Allow dynamic changing of the sampling rate during playback with Stream::update_sample_rate().

pub const PEAK_DETECT: FlagSet[src]

Find peaks instead of resampling.

pub const START_MUTED: FlagSet[src]

Create in muted state. If neither START_UNMUTED nor this is specified, it is left to the server to decide whether to create the stream in muted or in un-muted state.

pub const ADJUST_LATENCY: FlagSet[src]

Try to adjust the latency of the sink/source based on the requested buffer metrics and adjust buffer metrics accordingly. Also see BufferAttr. This option may not be specified at the same time as EARLY_REQUESTS.

pub const EARLY_REQUESTS: FlagSet[src]

Enable compatibility mode for legacy clients that rely on a “classic” hardware device fragment-style playback model. If this option is set, the minreq value of the buffer metrics gets a new meaning: instead of just specifying that no requests asking for less new data than this value will be made to the client it will also guarantee that requests are generated as early as this limit is reached. This flag should only be set in very few situations where compatibility with a fragment-based playback model needs to be kept and the client applications cannot deal with data requests that are delayed to the latest moment possible. (Usually these are programs that use usleep() or a similar call in their playback loops instead of sleeping on the device itself.) Also see BufferAttr. This option may not be specified at the same time as ADJUST_LATENCY.

pub const DONT_INHIBIT_AUTO_SUSPEND: FlagSet[src]

If set this stream won’t be taken into account when it is checked whether the device this stream is connected to should auto-suspend.

pub const START_UNMUTED: FlagSet[src]

Create in unmuted state. If neither START_MUTED nor this is specified, it is left to the server to decide whether to create the stream in muted or in unmuted state.

pub const FAIL_ON_SUSPEND: FlagSet[src]

If the sink/source this stream is connected to is suspended during the creation of this stream, cause it to fail. If the sink/source is being suspended during creation of this stream, make sure this stream is terminated.

pub const RELATIVE_VOLUME: FlagSet[src]

If a volume is passed when this stream is created, consider it relative to the sink’s current volume, never as absolute device volume. If this is not specified the volume will be consider absolute when the sink is in flat volume mode, relative otherwise.

pub const PASSTHROUGH: FlagSet[src]

Used to tag content that will be rendered by passthrough sinks. The data will be left as is and not reformatted, resampled.

pub const fn empty() -> FlagSet[src]

Returns an empty set of flags

pub const fn all() -> FlagSet[src]

Returns the set containing all flags.

pub const fn bits(&self) -> u32[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u32) -> Option<FlagSet>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: u32) -> FlagSet[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: u32) -> FlagSet[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: FlagSet) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: FlagSet) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: FlagSet)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: FlagSet)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: FlagSet)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: FlagSet, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Binary for FlagSet[src]

impl BitAnd<FlagSet> for FlagSet[src]

type Output = FlagSet

The resulting type after applying the & operator.

fn bitand(self, other: FlagSet) -> FlagSet[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<FlagSet> for FlagSet[src]

fn bitand_assign(&mut self, other: FlagSet)[src]

Disables all flags disabled in the set.

impl BitOr<FlagSet> for FlagSet[src]

type Output = FlagSet

The resulting type after applying the | operator.

fn bitor(self, other: FlagSet) -> FlagSet[src]

Returns the union of the two sets of flags.

impl BitOrAssign<FlagSet> for FlagSet[src]

fn bitor_assign(&mut self, other: FlagSet)[src]

Adds the set of flags.

impl BitXor<FlagSet> for FlagSet[src]

type Output = FlagSet

The resulting type after applying the ^ operator.

fn bitxor(self, other: FlagSet) -> FlagSet[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<FlagSet> for FlagSet[src]

fn bitxor_assign(&mut self, other: FlagSet)[src]

Toggles the set of flags.

impl Clone for FlagSet[src]

impl Copy for FlagSet[src]

impl Debug for FlagSet[src]

impl Default for FlagSet[src]

impl Eq for FlagSet[src]

impl Extend<FlagSet> for FlagSet[src]

impl FromIterator<FlagSet> for FlagSet[src]

impl Hash for FlagSet[src]

impl LowerHex for FlagSet[src]

impl Not for FlagSet[src]

type Output = FlagSet

The resulting type after applying the ! operator.

fn not(self) -> FlagSet[src]

Returns the complement of this set of flags.

impl Octal for FlagSet[src]

impl Ord for FlagSet[src]

impl PartialEq<FlagSet> for FlagSet[src]

impl PartialOrd<FlagSet> for FlagSet[src]

impl StructuralEq for FlagSet[src]

impl StructuralPartialEq for FlagSet[src]

impl Sub<FlagSet> for FlagSet[src]

type Output = FlagSet

The resulting type after applying the - operator.

fn sub(self, other: FlagSet) -> FlagSet[src]

Returns the set difference of the two sets of flags.

impl SubAssign<FlagSet> for FlagSet[src]

fn sub_assign(&mut self, other: FlagSet)[src]

Disables all flags enabled in the set.

impl UpperHex for FlagSet[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.