pub struct ObsPipeWireSourceRef { /* private fields */ }Available on Linux only.
Expand description
General PipeWire source reference wrapper, which has a restore_token
Implementations§
Source§impl ObsPipeWireSourceRef
impl ObsPipeWireSourceRef
pub fn inner_source(&self) -> &ObsSourceRef
pub fn inner_source_mut(&mut self) -> &mut ObsSourceRef
Sourcepub fn into_inner_source(self) -> ObsSourceRef
pub fn into_inner_source(self) -> ObsSourceRef
Consumes self and returns the inner ObsSourceRef
You can still update this source (if created by libobs-simple) and create an updater like so:
ⓘ
let updater = my_custom_source.create_updater()?;
// Or consume the custom wrapper and work with the generic source directly.
let source = my_custom_source.into_inner_source();
let updater = source.create_updater::<MyCustomSourceUpdater>()?;Source§impl ObsPipeWireSourceRef
impl ObsPipeWireSourceRef
Sourcepub fn new(
source: ObsSourceRef,
source_type: ObsPipeWireSourceType,
) -> Result<Self, ObsError>
pub fn new( source: ObsSourceRef, source_type: ObsPipeWireSourceType, ) -> Result<Self, ObsError>
Creates a new ObsPipeWireSourceRef from an ObsSourceRef.
Sourcepub fn get_restore_token(&self) -> Result<Option<String>, ObsError>
pub fn get_restore_token(&self) -> Result<Option<String>, ObsError>
Gets the restore token used for reconnecting to previous sessions for pipewire-desktop-capture-source and pipewire-window-capture-source sources.
As of right now, there is no callback or signal to notify when the token has been set, you have to call this method to get the restore token.
The restore token will most probably be of Some(String) after the user has selected a screen or window to capture.
pub fn create_updater<'a>( &'a mut self, ) -> Result<ObsPipeWireGeneralUpdater<'a>, ObsError>
pub fn get_source_type(&self) -> ObsPipeWireSourceType
Trait Implementations§
Source§impl Clone for ObsPipeWireSourceRef
impl Clone for ObsPipeWireSourceRef
Source§impl Debug for ObsPipeWireSourceRef
impl Debug for ObsPipeWireSourceRef
Source§impl ObsObjectTrait for ObsPipeWireSourceRef
impl ObsObjectTrait for ObsPipeWireSourceRef
fn name(&self) -> ObsString
fn id(&self) -> ObsString
fn runtime(&self) -> &ObsRuntime
fn settings(&self) -> Result<ImmutableObsData, ObsError>
fn hotkey_data(&self) -> Result<ImmutableObsData, ObsError>
Source§fn update_settings(&self, settings: ObsData) -> Result<(), ObsError>
fn update_settings(&self, settings: ObsData) -> Result<(), ObsError>
Updates the settings of this output. Fails if active.
Source§fn create_updater<'a, T>(&'a mut self) -> Result<T, ObsError>
fn create_updater<'a, T>(&'a mut self) -> Result<T, ObsError>
Updates the object with the current settings.
For examples please take a look at the Github repository.
Source§impl ObsSourceTrait for ObsPipeWireSourceRef
impl ObsSourceTrait for ObsPipeWireSourceRef
fn signals(&self) -> &Arc<ObsSourceSignals> ⓘ
fn get_active_filters(&self) -> Result<Vec<ObsFilterGuardPair>, ObsError>
fn apply_filter(&self, filter: &ObsFilterRef) -> Result<(), ObsError>
Auto Trait Implementations§
impl !RefUnwindSafe for ObsPipeWireSourceRef
impl !UnwindSafe for ObsPipeWireSourceRef
impl Forget for ObsPipeWireSourceRef
impl Freeze for ObsPipeWireSourceRef
impl Move for ObsPipeWireSourceRef
impl Send for ObsPipeWireSourceRef
impl Sync for ObsPipeWireSourceRef
impl Unpin for ObsPipeWireSourceRef
impl UnsafeUnpin for ObsPipeWireSourceRef
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ObsMediaSourceExt for Twhere
T: ObsSourceTrait + ?Sized,
impl<T> ObsMediaSourceExt for Twhere
T: ObsSourceTrait + ?Sized,
fn media_play(&self) -> Result<(), ObsError>
fn media_pause(&self) -> Result<(), ObsError>
fn media_set_paused(&self, paused: bool) -> Result<(), ObsError>
fn media_restart(&self) -> Result<(), ObsError>
fn media_stop(&self) -> Result<(), ObsError>
fn media_next(&self) -> Result<(), ObsError>
fn media_previous(&self) -> Result<(), ObsError>
Source§fn media_seek(&self, position: Duration) -> Result<(), ObsError>
fn media_seek(&self, position: Duration) -> Result<(), ObsError>
Requests a media seek to
position. Read morefn media_position(&self) -> Result<Option<Duration>, ObsError>
fn media_duration(&self) -> Result<Option<Duration>, ObsError>
fn media_state(&self) -> Result<MediaState, ObsError>
Source§impl<K> ObsPropertyObject for Kwhere
K: ObsSourceTrait,
impl<K> ObsPropertyObject for Kwhere
K: ObsSourceTrait,
Source§fn get_properties(&self) -> Result<HashMap<String, ObsProperty>, ObsError>
fn get_properties(&self) -> Result<HashMap<String, ObsProperty>, ObsError>
Returns the properties of the object
fn get_properties_by_source_id<T>( id: T, runtime: &ObsRuntime, ) -> Result<HashMap<String, ObsProperty>, ObsError>
Source§impl<T> ObsSourceAudioExt for Twhere
T: ObsSourceTrait + ?Sized,
impl<T> ObsSourceAudioExt for Twhere
T: ObsSourceTrait + ?Sized,
fn set_volume(&self, volume: LinearVolume) -> Result<(), ObsError>
fn volume(&self) -> Result<LinearVolume, ObsError>
fn set_muted(&self, muted: bool) -> Result<(), ObsError>
fn muted(&self) -> Result<bool, ObsError>
fn set_sync_offset(&self, offset: AudioSyncOffset) -> Result<(), ObsError>
fn sync_offset(&self) -> Result<AudioSyncOffset, ObsError>
Source§fn set_audio_mixes(&self, mixes: AudioMixMask) -> Result<(), ObsError>
fn set_audio_mixes(&self, mixes: AudioMixMask) -> Result<(), ObsError>
Routes this source to the selected native audio mixes/tracks.