pub struct ObsFilterRef { /* private fields */ }Implementations§
Source§impl ObsFilterRef
impl ObsFilterRef
Sourcepub fn new<T: Into<ObsString> + Sync + Send, K: Into<ObsString> + Sync + Send>(
id: T,
name: K,
settings: Option<ImmutableObsData>,
hotkey_data: Option<ImmutableObsData>,
runtime: ObsRuntime,
) -> Result<Self, ObsError>
pub fn new<T: Into<ObsString> + Sync + Send, K: Into<ObsString> + Sync + Send>( id: T, name: K, settings: Option<ImmutableObsData>, hotkey_data: Option<ImmutableObsData>, runtime: ObsRuntime, ) -> Result<Self, ObsError>
Creates a new OBS filter, this is a more advanced usage as you’ll have to specify the id, name, settings and hotkey_data yourself. This will be easier in the future…
Source§impl ObsFilterRef
impl ObsFilterRef
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>()?;Trait Implementations§
Source§impl Clone for ObsFilterRef
impl Clone for ObsFilterRef
Source§impl Debug for ObsFilterRef
impl Debug for ObsFilterRef
impl Eq for ObsFilterRef
Source§impl Hash for ObsFilterRef
impl Hash for ObsFilterRef
Source§impl ObsObjectTrait for ObsFilterRef
impl ObsObjectTrait for ObsFilterRef
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: ObsObjectUpdater<'a, ToUpdate = Self> + Send + Sync>(
&'a mut self,
) -> Result<T, ObsError>
fn create_updater<'a, T: ObsObjectUpdater<'a, ToUpdate = Self> + Send + Sync>( &'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 ObsPropertyActions for ObsFilterRef
impl ObsPropertyActions for ObsFilterRef
Source§impl ObsSourceTrait for ObsFilterRef
impl ObsSourceTrait for ObsFilterRef
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 ObsFilterRef
impl !UnwindSafe for ObsFilterRef
impl Forget for ObsFilterRef
impl Freeze for ObsFilterRefwhere
*const ArcInner<ObsSourceSignals> is !null: Freeze,
PhantomData<ArcInner<ObsSourceSignals>>: Freeze,
*const [u8] is !null: Freeze,
PhantomData<[u8]>: Freeze,
*const ArcInner<RwLock<ImmutableObsData>> is !null: Freeze,
PhantomData<ArcInner<RwLock<ImmutableObsData>>>: Freeze,
*const ArcInner<RwLock<Vec<ObsFilterGuardPair>>> is !null: Freeze,
PhantomData<ArcInner<RwLock<Vec<ObsFilterGuardPair>>>>: Freeze,
*const ArcInner<Sender<ObsCommand>> is !null: Freeze,
PhantomData<ArcInner<Sender<ObsCommand>>>: Freeze,
*const ArcInner<Sender<Box<dyn FnOnce() + Send>>> is !null: Freeze,
PhantomData<ArcInner<Sender<Box<dyn FnOnce() + Send>>>>: Freeze,
*const ArcInner<Atomic<u8>> is !null: Freeze,
PhantomData<ArcInner<Atomic<u8>>>: Freeze,
*const ArcInner<NativeObjectRegistry> is !null: Freeze,
PhantomData<ArcInner<NativeObjectRegistry>>: Freeze,
NonZero<u64>: Freeze,
*const ArcInner<_ObsRuntimeGuard> is !null: Freeze,
PhantomData<ArcInner<_ObsRuntimeGuard>>: Freeze,
*const ArcInner<NativeHandleLease> is !null: Freeze,
PhantomData<ArcInner<NativeHandleLease>>: Freeze,
PhantomData<fn() -> *mut obs_source>: Freeze,
impl Move for ObsFilterRef
impl Send for ObsFilterRefwhere
Arc<ObsSourceSignals>: Send,
BoxRaw<[u8]>: Send,
Arc<RwLock<ImmutableObsData>>: Send,
Arc<RwLock<Vec<ObsFilterGuardPair>>>: Send,
Arc<Sender<ObsCommand>>: Send,
Arc<Sender<Box<dyn FnOnce() + Send>>>: Send,
Arc<Atomic<u8>>: Send,
Arc<NativeObjectRegistry>: Send,
NonZero<u64>: Send,
Arc<_ObsRuntimeGuard>: Send,
Arc<NativeHandleLease>: Send,
impl Sync for ObsFilterRefwhere
Arc<ObsSourceSignals>: Sync,
BoxRaw<[u8]>: Sync,
Arc<RwLock<ImmutableObsData>>: Sync,
Arc<RwLock<Vec<ObsFilterGuardPair>>>: Sync,
Arc<Sender<ObsCommand>>: Sync,
Arc<Sender<Box<dyn FnOnce() + Send>>>: Sync,
Arc<Atomic<u8>>: Sync,
Arc<NativeObjectRegistry>: Sync,
NonZero<u64>: Sync,
Arc<_ObsRuntimeGuard>: Sync,
Arc<NativeHandleLease>: Sync,
impl Unpin for ObsFilterRefwhere
Arc<ObsSourceSignals>: Unpin,
Box<[u8]>: Unpin,
Arc<RwLock<ImmutableObsData>>: Unpin,
Arc<RwLock<Vec<ObsFilterGuardPair>>>: Unpin,
Arc<Sender<ObsCommand>>: Unpin,
Arc<Sender<Box<dyn FnOnce() + Send>>>: Unpin,
Arc<Atomic<u8>>: Unpin,
Arc<NativeObjectRegistry>: Unpin,
NonZero<u64>: Unpin,
Arc<_ObsRuntimeGuard>: Unpin,
Arc<NativeHandleLease>: Unpin,
impl UnsafeUnpin for ObsFilterRefwhere
*const ArcInner<ObsSourceSignals> is !null: UnsafeUnpin,
PhantomData<ArcInner<ObsSourceSignals>>: UnsafeUnpin,
*const [u8] is !null: UnsafeUnpin,
PhantomData<[u8]>: UnsafeUnpin,
*const ArcInner<RwLock<ImmutableObsData>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<ImmutableObsData>>>: UnsafeUnpin,
*const ArcInner<RwLock<Vec<ObsFilterGuardPair>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Vec<ObsFilterGuardPair>>>>: UnsafeUnpin,
*const ArcInner<Sender<ObsCommand>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Sender<ObsCommand>>>: UnsafeUnpin,
*const ArcInner<Sender<Box<dyn FnOnce() + Send>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Sender<Box<dyn FnOnce() + Send>>>>: UnsafeUnpin,
*const ArcInner<Atomic<u8>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u8>>>: UnsafeUnpin,
*const ArcInner<NativeObjectRegistry> is !null: UnsafeUnpin,
PhantomData<ArcInner<NativeObjectRegistry>>: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
*const ArcInner<_ObsRuntimeGuard> is !null: UnsafeUnpin,
PhantomData<ArcInner<_ObsRuntimeGuard>>: UnsafeUnpin,
*const ArcInner<NativeHandleLease> is !null: UnsafeUnpin,
PhantomData<ArcInner<NativeHandleLease>>: UnsafeUnpin,
PhantomData<fn() -> *mut obs_source>: UnsafeUnpin,
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: Into<ObsString> + Sync + Send>( 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.