Skip to main content

ObsSourceBuilder

Trait ObsSourceBuilder 

Source
pub trait ObsSourceBuilder: ObsObjectBuilder {
    type T: ObsSourceTrait + Clone + 'static;

    // Required method
    fn build(self) -> Result<Self::T, ObsError>
       where Self: Sized;

    // Provided method
    fn add_to_scene(
        self,
        scene: &mut ObsSceneRef,
    ) -> Result<ObsSceneItemRef<Self::T>, ObsError>
       where Self: Sized { ... }
}

Required Associated Types§

Source

type T: ObsSourceTrait + Clone + 'static

Required Methods§

Source

fn build(self) -> Result<Self::T, ObsError>
where Self: Sized,

Provided Methods§

Source

fn add_to_scene( self, scene: &mut ObsSceneRef, ) -> Result<ObsSceneItemRef<Self::T>, ObsError>
where Self: Sized,

Both items are returned: the source and the scene item it was added as. You can safely drop these items, they are stored within the scene if you don’t need them.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ObsSourceBuilder for AlsaInputSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for GameCaptureSourceBuilder

Available on Windows only.
Source§

impl ObsSourceBuilder for JackOutputSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for LinuxGeneralScreenCaptureBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for LinuxGeneralWindowCaptureBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for MonitorCaptureSourceBuilder

Available on Windows only.
Source§

impl ObsSourceBuilder for PipeWireCameraSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for PipeWireDesktopCaptureSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for PipeWireScreenCaptureSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for PipeWireWindowCaptureSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for PulseInputSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for PulseOutputSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for ScreenCaptureSourceBuilder

Available on macOS only.
Source§

impl ObsSourceBuilder for V4L2InputSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for WindowCaptureSourceBuilder

Available on Windows only.
Source§

impl ObsSourceBuilder for X11CaptureSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for XCompositeInputSourceBuilder

Available on Linux only.