pub struct MonitorCaptureSourceBuilder { /* private fields */ }Available on Windows only.
Expand description
Provides an easy-to-use builder for the monitor capture source.
Implementations§
Source§impl MonitorCaptureSourceBuilder
impl MonitorCaptureSourceBuilder
pub fn set_monitor_id_raw<T: Into<ObsString> + Sync + Send>( self, monitor_id_raw: T, ) -> Self
Sourcepub fn set_capture_cursor(self, capture_cursor: bool) -> Self
pub fn set_capture_cursor(self, capture_cursor: bool) -> Self
Sets whether the cursor should be captured.
Sourcepub fn set_compatibility(self, compatibility: bool) -> Self
pub fn set_compatibility(self, compatibility: bool) -> Self
Compatibility mode for the monitor capture source.
Sourcepub fn set_force_sdr(self, force_sdr: bool) -> Self
pub fn set_force_sdr(self, force_sdr: bool) -> Self
If the capture should force SDR
Source§impl MonitorCaptureSourceBuilder
impl MonitorCaptureSourceBuilder
Sourcepub fn get_monitors() -> Result<Vec<DisplayInfo>, ObsSimpleError>
pub fn get_monitors() -> Result<Vec<DisplayInfo>, ObsSimpleError>
Gets all available monitors
pub fn set_monitor(self, monitor: &DisplayInfo) -> Self
Source§impl MonitorCaptureSourceBuilder
impl MonitorCaptureSourceBuilder
Sourcepub fn set_capture_method(self, method: ObsDisplayCaptureMethod) -> Self
pub fn set_capture_method(self, method: ObsDisplayCaptureMethod) -> Self
Sets the capture method for the monitor capture source. If you want to use DXGI, it is required for your application to be DPI aware.
Trait Implementations§
Source§impl Debug for MonitorCaptureSourceBuilder
impl Debug for MonitorCaptureSourceBuilder
Source§impl ObsObjectBuilder for MonitorCaptureSourceBuilder
impl ObsObjectBuilder for MonitorCaptureSourceBuilder
fn new<T: Into<ObsString> + Send + Sync>( name: T, runtime: ObsRuntime, ) -> Result<Self, ObsError>
fn runtime(&self) -> &ObsRuntime
fn get_settings(&self) -> &ObsData
fn get_settings_updater(&mut self) -> &mut ObsDataUpdater
fn get_hotkeys(&self) -> &ObsData
fn get_hotkeys_updater(&mut self) -> &mut ObsDataUpdater
fn object_build(self) -> Result<ObjectInfo, ObsError>
Source§impl ObsSourceBuilder for MonitorCaptureSourceBuilder
impl ObsSourceBuilder for MonitorCaptureSourceBuilder
type T = MonitorCaptureSource
fn build(self) -> Result<Self::T, ObsError>where
Self: Sized,
Source§fn add_to_scene(
self,
scene: &mut ObsSceneRef,
) -> Result<ObsSceneItemRef<Self::T>, ObsError>where
Self: Sized,
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.
Auto Trait Implementations§
impl !RefUnwindSafe for MonitorCaptureSourceBuilder
impl !UnwindSafe for MonitorCaptureSourceBuilder
impl Forget for MonitorCaptureSourceBuilder
impl Freeze for MonitorCaptureSourceBuilder
impl Move for MonitorCaptureSourceBuilder
impl Send for MonitorCaptureSourceBuilder
impl Sync for MonitorCaptureSourceBuilder
impl Unpin for MonitorCaptureSourceBuilder
impl UnsafeUnpin for MonitorCaptureSourceBuilder
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