pub struct PipeWireCameraSourceBuilder { /* private fields */ }Available on Linux only.
Expand description
A source for PipeWire camera capture via camera portal.
This source captures video from camera devices through PipeWire’s camera portal, providing secure access to camera devices in sandboxed environments.
Implementations§
Source§impl PipeWireCameraSourceBuilder
impl PipeWireCameraSourceBuilder
Sourcepub fn set_camera_id<T: Into<ObsString> + Sync + Send>(
self,
camera_id: T,
) -> Self
pub fn set_camera_id<T: Into<ObsString> + Sync + Send>( self, camera_id: T, ) -> Self
Camera device node (e.g., “/dev/video0”)
Sourcepub fn set_video_format<T: Into<ObsString> + Sync + Send>(
self,
video_format: T,
) -> Self
pub fn set_video_format<T: Into<ObsString> + Sync + Send>( self, video_format: T, ) -> Self
Video format (FOURCC as string)
Sourcepub fn set_resolution<T: Into<ObsString> + Sync + Send>(
self,
resolution: T,
) -> Self
pub fn set_resolution<T: Into<ObsString> + Sync + Send>( self, resolution: T, ) -> Self
Resolution as “width x height”
Sourcepub fn set_framerate<T: Into<ObsString> + Sync + Send>(
self,
framerate: T,
) -> Self
pub fn set_framerate<T: Into<ObsString> + Sync + Send>( self, framerate: T, ) -> Self
Framerate as “num/den”
Source§impl PipeWireCameraSourceBuilder
impl PipeWireCameraSourceBuilder
Sourcepub fn set_resolution_values(self, width: u32, height: u32) -> Self
pub fn set_resolution_values(self, width: u32, height: u32) -> Self
Set resolution using width and height values
Sourcepub fn set_framerate_values(self, num: u32, den: u32) -> Self
pub fn set_framerate_values(self, num: u32, den: u32) -> Self
Set framerate using numerator and denominator
Trait Implementations§
Source§impl Debug for PipeWireCameraSourceBuilder
impl Debug for PipeWireCameraSourceBuilder
Source§impl ObsObjectBuilder for PipeWireCameraSourceBuilder
impl ObsObjectBuilder for PipeWireCameraSourceBuilder
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 PipeWireCameraSourceBuilder
impl ObsSourceBuilder for PipeWireCameraSourceBuilder
type T = ObsSourceRef
fn build(self) -> Result<Self::T, ObsError>where
Self: Sized,
§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 Freeze for PipeWireCameraSourceBuilder
impl !RefUnwindSafe for PipeWireCameraSourceBuilder
impl Send for PipeWireCameraSourceBuilder
impl Sync for PipeWireCameraSourceBuilder
impl Unpin for PipeWireCameraSourceBuilder
impl UnsafeUnpin for PipeWireCameraSourceBuilder
impl !UnwindSafe for PipeWireCameraSourceBuilder
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